Первичная реализация формы отправки нового письма с активацией аккаунта, чуть-чуть рефакторинга тестов

This commit is contained in:
ErickSkrauch
2016-03-13 02:19:00 +03:00
parent 7e2247ccb5
commit b9ee667829
11 changed files with 227 additions and 81 deletions

View File

@@ -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();