2014-06-09, 04:51 PM
By the way, with forms I was told just to use inspect element and find the forum source code. I'm using the following code to set a user to a group called closed, bans that never expire basically.
Doesn't seem to be working properly though. It's on a member profile. The button is there, but it just redirects me to the homepage and doesn't do anything to the account.
Destroy666's reply to me in another thread:
What would be the correct method of doing this then? I just want to change their usergroup to Closed. Only administrators can perform this action.
<if $mybb->user['usergroup'] == 4 then>
<form action="index.php?module=user-users&action=edit&uid={$member['uid']}" method="post" enctype="multipart/form-data">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="usergroup" value="9" />
<input type="submit" value="Close Account" class="button" />
</form>
</if>
Doesn't seem to be working properly though. It's on a member profile. The button is there, but it just redirects me to the homepage and doesn't do anything to the account.
Destroy666's reply to me in another thread:
Quote:Please don't stack up multiple issues in one thread (create new), it started to become a mess because we don't answer anything relevant to the original question.
Anyways, this is a back-end ACP action and you're leading to front-end index.php which doesn't have it.
Additionally, it's {$memprofile['uid']}, not {$member['uid']} and you need to add all required fields to form or there will be an error like: "You did not enter a username. Please enter one."
What would be the correct method of doing this then? I just want to change their usergroup to Closed. Only administrators can perform this action.