This commit is contained in:
Roman Kelesidis 2023-10-03 19:39:45 +07:00
parent efc0e83948
commit c42225beaa
5 changed files with 17 additions and 10 deletions

View File

@ -9,7 +9,7 @@ $user_id = (int) $this->request['user_id'];
if (!$user_id OR !$u_data = get_userdata($user_id)) if (!$user_id OR !$u_data = get_userdata($user_id))
{ {
$this->ajax_die('Invalid user_id'); $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
} }
if (!IS_ADMIN && $user_id != $user->id) if (!IS_ADMIN && $user_id != $user->id)

View File

@ -9,7 +9,7 @@ $new_opt = Zend\Json\Json::decode($this->request['user_opt'], Zend\Json\Json::TY
if (!$user_id OR !$u_data = get_userdata($user_id)) if (!$user_id OR !$u_data = get_userdata($user_id))
{ {
$this->ajax_die('invalid user_id'); $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
} }
if (!is_array($new_opt)) if (!is_array($new_opt))

View File

@ -9,7 +9,7 @@ $rank_id = intval($this->request['rank_id']);
if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id)) if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id))
{ {
$this->ajax_die("invalid user_id: $user_id"); $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
} }
if ($rank_id != 0 && !isset($ranks[$rank_id])) if ($rank_id != 0 && !isset($ranks[$rank_id]))

View File

@ -6,7 +6,7 @@ global $lang, $user;
if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id)) if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id))
{ {
$this->ajax_die("invalid user_id: $user_id"); $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
} }
if (!$mode = (string) $this->request['mode']) if (!$mode = (string) $this->request['mode'])

View File

@ -4,8 +4,15 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
global $userdata, $lang, $bb_cfg; global $userdata, $lang, $bb_cfg;
$mode = (string) $this->request['mode']; if (!$user_id = $this->request['user_id'])
$user_id = $this->request['user_id']; {
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
}
if (!$mode = (string) $this->request['mode'])
{
$this->ajax_die('invalid mode (empty)');
}
switch ($mode) switch ($mode)
{ {