mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Первичная реализация формы отправки нового письма с активацией аккаунта, чуть-чуть рефакторинга тестов
This commit is contained in:
@@ -189,7 +189,7 @@ class Account extends ActiveRecord implements IdentityInterface {
|
||||
}
|
||||
|
||||
public function getEmailActivations() {
|
||||
return $this->hasMany(EmailActivation::class, ['id' => 'account_id']);
|
||||
return $this->hasMany(EmailActivation::class, ['account_id' => 'id']);
|
||||
}
|
||||
|
||||
public function getSessions() {
|
||||
@@ -206,9 +206,9 @@ class Account extends ActiveRecord implements IdentityInterface {
|
||||
* @return bool
|
||||
*/
|
||||
public function canAutoApprove(OauthClient $client, array $scopes = []) {
|
||||
//if ($client->is_trusted) {
|
||||
// return true;
|
||||
//}
|
||||
if ($client->is_trusted) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** @var OauthSession|null $session */
|
||||
$session = $this->getSessions()->andWhere(['client_id' => $client->id])->one();
|
||||
|
Reference in New Issue
Block a user