diff options
Diffstat (limited to 'controllers')
-rw-r--r-- | controllers/UsersController.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/controllers/UsersController.php b/controllers/UsersController.php index 57d7efe..0d7fc28 100644 --- a/controllers/UsersController.php +++ b/controllers/UsersController.php @@ -170,7 +170,7 @@ class UsersController extends \lithium\action\Controller { { $user = Auth::check('default'); if ($user) { - $user = User::find($user['_id']); + $user = User::find($user['id']); $user->post($this->request->data); } @@ -235,7 +235,7 @@ class UsersController extends \lithium\action\Controller { if ($user) { $user = User::find('first', array('conditions' => array('username' => $user['username']))); - $user->lastLogin = new MongoDate(); + $user->lastLogin = date('Y-m-d H:i:s', time()); $user->save(null, array('validate' => false)); @@ -327,7 +327,7 @@ class UsersController extends \lithium\action\Controller { { //Get the user using their login information (from auth) $user = Auth::check('default'); - $user = User::find($user['_id']); + $user = User::find($user['id']); //If the request isn't empty if(!empty($this->request->data)) { |