Quote:
Originally posted by rochen
No the form for them to enter their username would be in a hosting control panel, which only customers would have access to anyway. Any customer who needs access at the moment needs to submit a support ticket to us, then we change the group. With this system, they could just login to their hosting control panel, enter the username and get access to the customer only area of our forums.
|
Edit misc.php (the one in forum dir not the misc.php in the admin dir!), find:
PHP Code:
if ($HTTP_POST_VARS['action']) {
$action = $HTTP_POST_VARS['action'];
} else if ($HTTP_GET_VARS['action']) {
$action = $HTTP_GET_VARS['action'];
}
After that add:
PHP Code:
// ############################### start change usergroup ###############################
if ($action=="iamacustomer") {
include("./global.php");
if ($bbuserinfo[userid]<1) {show_nopermission();}
if ($bbuserinfo[usergroupid]==2)
{
$u=$bbuserinfo[userid];
$DB_site->query("UPDATE user SET usergroupid=Z WHERE userid='$u'");
eval("standarderror(\"".gettemplate("usergroup_changed")."\");");
}
exit;
}
Now you can put the link
http://yoursite.com/forum/misc.php?action=iamacustomer somewhere hidden where only your customers can access. By following the link their usergroup will change to Z (edit it)..
Dont forget to create a new template called "usergroup_changed". It will be displayed when their usergroup changes successfully.
Enjoy..