load('auth')); $this->oo = $oo; } protected function _login($user,$password,$remember) { $this->complete_login($user); if ($remember) { $aoo = $this->oo->account_oauth->where('account_id','=',$user->id)->find(); // Record our user in the DB $aoo->account_id = $user->id; $aoo->oauth_id = $this->oo->id; $aoo->userid = $remember->user_id(); if ($user instanceof Auth_ORM_External_OAuth2 OR $user instanceof Auth_ORM_External_OAuth) $aoo->oauth_data = array( 'token'=>$remember->token, ); elseif ($user instanceof Auth_ORM_External) $aoo->oauth_data = array( 'token'=>$remember->ao->getAccessToken(), ); return $aoo->save(); } return TRUE; } } ?>