Ejemplo n.º 1
0
 static function getByUserAndToken($user, $token)
 {
     if (empty($user) || empty($token)) {
         return null;
     }
     $oau = new Oauth_application_user();
     $oau->profile_id = $user->id;
     $oau->token = $token;
     $oau->limit(1);
     $result = $oau->find(true);
     return empty($result) ? null : $oau;
 }
Ejemplo n.º 2
0
 static function getByKeys($user, $app)
 {
     if (empty($user) || empty($app)) {
         return null;
     }
     $oau = new Oauth_application_user();
     $oau->profile_id = $user->id;
     $oau->application_id = $app->id;
     $oau->limit(1);
     $result = $oau->find(true);
     return empty($result) ? null : $oau;
 }