mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Redirect to viewprofile.php if profile.php hasn't arguments (#202)
* Redirect to viewprofile.php if profile.php hasn't arguments * Update CHANGELOG.md
This commit is contained in:
parent
a3494791b7
commit
690f34d50b
@ -6,6 +6,7 @@
|
||||
**Merged pull requests:**
|
||||
|
||||
- Release v2.1.5-2023.06 🎉
|
||||
- Redirect to viewprofile.php if profile.php hasn't arguments [\#202](https://github.com/torrentpier/torrentpier-lts/pull/202) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Show smilies in post for guests [\#196](https://github.com/torrentpier/torrentpier-lts/pull/196) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added showing PM counter in page title [\#193](https://github.com/torrentpier/torrentpier-lts/pull/193) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Corrected translations [\#183](https://github.com/torrentpier/torrentpier-lts/pull/183) ([belomaxorka](https://github.com/belomaxorka))
|
||||
|
@ -8,19 +8,22 @@ $datastore->enqueue(array(
|
||||
'ranks',
|
||||
));
|
||||
|
||||
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'))
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ require(BB_ROOT . 'common.php');
|
||||
$user->session_start();
|
||||
|
||||
set_die_append_msg();
|
||||
$mode = request_var('mode', '');
|
||||
$mode = request_var('mode', 'viewprofile');
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user