Admin to make changes in script register users

Place for comments, problems, questions, or any issue related to the JavaScript / PHP scripts from this site.
Admin
Site Admin
Posts: 805

Admin to make changes in script register users

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 Posts: 805
Try this, (I didn't test it)..
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;
With this:

Code: Select all

$_SESSION['usritspage'] = (isset($_SESSION['rank']) && $_SESSION['rank']==9) ? 1 : 0;
- 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.