Esempio n. 1
0
 /**
  * Finds an account by id.
  *
  * @param int $id
  *
  * @return models\Account|null
  */
 public function findAccountById($id)
 {
     /**
      * xiaoma update;
      */
     // $clientId = 0;
     // $provider = $client->getId();
     // switch($provider){
     //     case 'qq' : $clientId = $client->getUserAttributes()['openid'];break;
     //     case 'sina' : $clientId = $client->getUserAttributes()['uid'];break;
     //     default: $clientId = $client->getUserAttributes()['id'];break;
     // }
     // return $this->accountQuery->where([
     //     'provider'  => $provider,
     //     'client_id' => $clientId,
     // ])->one();
     return $this->accountQuery->where(['id' => $id])->one();
 }
Esempio n. 2
0
 /**
  * Finds an account by id.
  *
  * @param int $id
  *
  * @return models\Account|null
  */
 public function findAccountById($id)
 {
     return $this->accountQuery->where(['id' => $id])->one();
 }