Bug correction in token regeneration

This commit is contained in:
Phyks 2013-10-28 21:24:01 +01:00
parent 97dbd3d330
commit d6e1a89be9

View File

@ -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']))