mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Redirect to viewprofile.php if profile.php hasn't arguments (#821)
This commit is contained in:
parent
dc46528918
commit
695d46e31e
2 changed files with 9 additions and 8 deletions
|
@ -18,15 +18,16 @@ $datastore->enqueue(array(
|
|||
'cat_forums',
|
||||
));
|
||||
|
||||
if (empty($_GET[POST_USERS_URL]) || $_GET[POST_USERS_URL] == GUEST_UID) {
|
||||
bb_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
if (!$profiledata = get_userdata($_GET[POST_USERS_URL])) {
|
||||
bb_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
|
||||
if (!$userdata['session_logged_in']) {
|
||||
redirect(LOGIN_URL . "?redirect={$_SERVER['REQUEST_URI']}");
|
||||
} else {
|
||||
if (empty($_GET[POST_USERS_URL])) {
|
||||
$_GET[POST_USERS_URL] = $userdata['user_id'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!$profiledata = get_userdata($_GET[POST_USERS_URL])) {
|
||||
bb_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
|
||||
if (!$ranks = $datastore->get('ranks')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue