Topic with question from a private message.
- How I can set the admin to be the one capable of making any changes to users' accounts in this script: https://coursesweb.net/php-mysql/registe ... -online_s2 ?
Admin to make changes in script register users
-
- Site Admin
- Posts: 805
Admin to make changes in script register users
Admin
Posts: 805
Try this, (I didn't test it)..
In the "users.php" file replace this code (line 24):
With this:
- If you have other questions related to code or scripts from this website, please post on forum; the answers might be useful for others too.
In the "users.php" file replace this code (line 24):
Code: Select all
$_SESSION['usritspage'] = ((isset($_SESSION['username']) && isset($_REQUEST['usr']) && strtolower($_SESSION['username'])==strtolower($_REQUEST['usr'])) || (isset($_SESSION['rank']) && $_SESSION['rank']==9)) ? 1 : 0;
Code: Select all
$_SESSION['usritspage'] = (isset($_SESSION['rank']) && $_SESSION['rank']==9) ? 1 : 0;