PDA

View Full Version : [fixed] Invalid redirect from user getinfo to admin control panel


Kier
Sat 4th Aug '01, 6:40am
This fix solves a problem that some people have when clicking the 'user options' link at the bottom
of a user's profile page, in order to view that user's details in the admin control panel.

Open moderator.php in your forums directory, and find these lines: if ($permissions[cancontrolpanel]) {
header("Location: admin/index.php?s=$session[sessionhash]&loc=user.php?s=$session[sessionhash]%26action=edit%26userid=$userid");
} elseif ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1")) {
header("Location: mod/index.php?s=$session[sessionhash]&loc=user.php?s=$session[sessionhash]%26action=view%26userid=$userid");then replace them with this: if ($permissions[cancontrolpanel]) {
header("Location: admin/index.php?s=$session[sessionhash]&loc=".urlencode("user.php?s=$session[sessionhash]&action=edit&userid=$userid"));
} elseif ($permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1")) {
header("Location: mod/index.php?s=$session[sessionhash]&loc=".urlencode("user.php?s=$session[sessionhash]&action=viewuser&userid=$userid"));