|
|
@@ -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)) {
|