diff options
author | Michael Francis <edude03@gmail.com> | 2011-07-10 22:06:15 -0400 |
---|---|---|
committer | Michael Francis <edude03@gmail.com> | 2011-07-10 22:06:15 -0400 |
commit | e735c32bd42b1882d8a6d7e03546de8dbd60e3f1 (patch) | |
tree | 7d03315e3fcee2c917a813f7dcf83f22c1279a98 | |
parent | dc2fe7923fdd56cc431c35b6037bf354a10d1ede (diff) | |
download | otakuhub-e735c32bd42b1882d8a6d7e03546de8dbd60e3f1.tar.xz |
Mongo fixes
-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)) { |