The first step should look like:
PHP Code:
<?php
error_reporting(7);
// admin hack
unset($canmodifyadmins);
// end admin hack
require("./global.php");
adminlog(iif($userid!=0,"user id = $userid",""));
The Second step should look like:
PHP Code:
if ($action=="edit") {
$user=$DB_site->query_first("SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,
avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
FROM user
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
WHERE user.userid=$userid");
// admin hack
if ($user[usergroupid]==6 && checklogperms($canmodifyadmins,0,"<p>You are not allowed to edit other admins.</p>")) {
// end admin hack
if ($user[coppauser]==1) {
Third Step should look like:
PHP Code:
doformfooter("Save Changes");
}
// admin hack
}
// end admin hack
// ###################### Start do update #######################
The config.php change should look like:
PHP Code:
// admin hack
$canmodifyadmins = "192";
// end admin hack
?>
Maybe that will help you better understand the changes?