Bug correction in token regeneration
This commit is contained in:
parent
97dbd3d330
commit
d6e1a89be9
@ -210,7 +210,7 @@
|
|||||||
if(check_token(600, 'edit_users')) {
|
if(check_token(600, 'edit_users')) {
|
||||||
$user = new User();
|
$user = new User();
|
||||||
if(!empty($_POST['user_id'])) {
|
if(!empty($_POST['user_id'])) {
|
||||||
$user->load(array('id' => $_POST['user_id']));
|
$user = $user->load(array('id' => $_POST['user_id']), true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$user->newJsonToken();
|
$user->newJsonToken();
|
||||||
@ -286,6 +286,8 @@
|
|||||||
$user = $user->load(array('id'=>$user_id), true);
|
$user = $user->load(array('id'=>$user_id), true);
|
||||||
$user->newJsonToken();
|
$user->newJsonToken();
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
|
if(empty($_GET['user_id']))
|
||||||
$_SESSION['current_user'] = $user->sessionStore();
|
$_SESSION['current_user'] = $user->sessionStore();
|
||||||
|
|
||||||
if(!empty($_GET['user_id']))
|
if(!empty($_GET['user_id']))
|
||||||
|
Loading…
Reference in New Issue
Block a user