you need to go to function/functions_users.php which is located in your root of hosting files and add this code -
Quote:
function changeusergroup($newusergroup, $user) {
$currentusergroup = $newusergroup;
if ($currentusergroup >= 0) {
$GLOBALS['adopts']->update("users", array("usergroup" => $currentusergroup), "username = '{$user}'");
return true;
}
return false;
}
|
then you need to create another page called changeusergroup.php and post this code -
Quote:
<?php
include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("functions/functions_friends.php");
include("functions/functions_items.php");
include("inc/lang.php");
include("inc/bbcode.php");
//***************//
// START SCRIPT //
//***************//
$newgroup= 1;
if($isloggedin == "yes"){
changeusergroup($newgroup, $GLOBALS['username']);
$article_title = "Hello, {$username}!";
$article_content = "You are now in usergroup {$newgroup}.";
}
else{
$article_title = "You are not logged in!";
$article_content = "You must be logged in to view this page!";
}
//***************//
// OUTPUT PAGE //
//***************//
echo showpage($article_title, $article_content, $date);
?>
|
but remember function_user.php is in function folder and you need to create new file called changeusergroup.php in main directory