mirror of
https://github.com/elyby/accounts.git
synced 2024-12-02 11:41:05 +05:30
Добавлена страница с отправкой письма для восстановления пароля от аккаунта
This commit is contained in:
parent
af2580795a
commit
5c056710bc
@ -126,6 +126,7 @@ class OauthController extends Controller {
|
|||||||
|
|
||||||
if (!$account->canAutoApprove($clientModel, $authParams['scopes'])) {
|
if (!$account->canAutoApprove($clientModel, $authParams['scopes'])) {
|
||||||
$isAccept = Yii::$app->request->post('accept');
|
$isAccept = Yii::$app->request->post('accept');
|
||||||
|
$isAccept = null;
|
||||||
if ($isAccept === null) {
|
if ($isAccept === null) {
|
||||||
throw new AcceptRequiredException();
|
throw new AcceptRequiredException();
|
||||||
}
|
}
|
||||||
|
@ -206,9 +206,9 @@ class Account extends ActiveRecord implements IdentityInterface {
|
|||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function canAutoApprove(OauthClient $client, array $scopes = []) {
|
public function canAutoApprove(OauthClient $client, array $scopes = []) {
|
||||||
if ($client->is_trusted) {
|
//if ($client->is_trusted) {
|
||||||
return true;
|
// return true;
|
||||||
}
|
//}
|
||||||
|
|
||||||
/** @var OauthSession|null $session */
|
/** @var OauthSession|null $session */
|
||||||
$session = $this->getSessions()->andWhere(['client_id' => $client->id])->one();
|
$session = $this->getSessions()->andWhere(['client_id' => $client->id])->one();
|
||||||
|
Loading…
Reference in New Issue
Block a user