From 97dbd3d33089511c8c626f65048f7e28e0f5fd93 Mon Sep 17 00:00:00 2001 From: Phyks Date: Mon, 28 Oct 2013 21:04:34 +0100 Subject: [PATCH] Bug correction in password update in admin backend --- TODO | 1 - index.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index fb159af..35e18d8 100755 --- a/TODO +++ b/TODO @@ -7,4 +7,3 @@ Improvements : * JSON output => do index view * API * README file -* Minify CSS / JS diff --git a/index.php b/index.php index ee025b3..55a1402 100644 --- a/index.php +++ b/index.php @@ -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();