Bug correction in password update in admin backend

This commit is contained in:
Phyks 2013-10-28 21:04:34 +01:00
parent b8de12d01b
commit 97dbd3d330
2 changed files with 2 additions and 3 deletions

1
TODO
View File

@ -7,4 +7,3 @@ Improvements :
* JSON output => do index view
* API
* README file
* Minify CSS / JS

View File

@ -206,11 +206,11 @@
exit();
}
if(!empty($_POST['login']) && !empty($_POST['display_name']) && !empty($_POST['email']) && (!empty($_POST['password']) && !empty($_POST['notifications']) || !empty($_POST['user_id'])) && isset($_POST['admin'])) {
if(!empty($_POST['login']) && !empty($_POST['display_name']) && !empty($_POST['email']) && (!empty($_POST['password']) || !empty($_POST['user_id'])) && !empty($_POST['notifications']) && isset($_POST['admin'])) {
if(check_token(600, 'edit_users')) {
$user = new User();
if(!empty($_POST['user_id'])) {
$user->setId($_POST['user_id']);
$user->load(array('id' => $_POST['user_id']));
}
else {
$user->newJsonToken();