From 1abe7372404a9d65f3b59eda2d83e628267b366d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 19 Oct 2014 23:01:51 +0200 Subject: Clean up the postgres changes Style cleanup and some regression fixes Signed-off-by: Florian Pritz --- application/controllers/user.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'application/controllers/user.php') diff --git a/application/controllers/user.php b/application/controllers/user.php index 57c6498b1..b542f2b4c 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -148,10 +148,9 @@ class User extends MY_Controller { ->get()->result_array(); // Convert timestamp to unix timestamp - foreach ($query as & $record) - { - if ( ! empty($record['created'])) - { + // TODO: migrate database to integer timestamp and get rid of this + foreach ($query as &$record) { + if (!empty($record['created'])) { $record['created'] = strtotime($record['created']); } } @@ -389,11 +388,11 @@ class User extends MY_Controller { if (empty($error)) { $this->db->where('id', $userid) - ->update('users', [ + ->update('users', array( 'password' => $this->muser->hash_password($password) - ]); + )); - $this->db->where($key, $key) + $this->db->where('key', $key) ->delete('actions'); $this->load->view('header', $this->data); -- cgit v1.2.3-24-g4f1b