Could anyone tell me how, (if possible) to hide the admin profile from being viewed by anyone, (except admin!).
Thank you.
http://www.coffee-mates.co.uk
Please give us more information. What should happen if someone tries to access the profile? How can they access the profile? Of course you can insert something like
if (profile_id == admin_profile_id) die();
Thanks for the reply.
The situation is that only logged in users can see the memberlist, which includes the admin profile.
Ideally, I'd prefer it if the admin profile didn't show up at all for those viewing the memberlist. I'm the only one with admin rights, and so only I would be able to see my admin profile. If that were not possible, then if someone tried to view the admin profile, they would get a message saying 'not available to view' or something like that.
The former is preferable however.
The code you suggest: if (profile_id == admin_profile_id) die(); would this achieve any of the above?
Many thanks.
Quote from: EllieG on September 03, 2010, 12:44:30 PM
I'd prefer it if the admin profile didn't show up at all
Open
usermgr.php, find
foreach ($users as $user) {
and replace with
foreach ($users as $user) {
if ($user['user_id'] == 1 && !GALLERY_ADMIN_MODE) continue;
Quote from: EllieG on September 03, 2010, 12:44:30 PM
if someone tried to view the admin profile, they would get a message saying 'not available to view' or something like that.
Open
profile.php, find
if ($superCage->get->keyExists('uid')) {
$uid = $superCage->get->getInt('uid');
} else {
$uid = -1;
}
and replace with
if ($superCage->get->keyExists('uid')) {
$uid = $superCage->get->getInt('uid');
} else {
$uid = -1;
}
if ($uid == 1 && !GALLERY_ADMIN_MODE) $uid = -1;
I suggest to apply both code changes.