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