X
X
XenK2016-10-11 19:07:12
Yii
XenK, 2016-10-11 19:07:12

Authorization through VK Yii2 does not work?

I did authorization as it says here:
https://github.com/yiisoft/yii2-authclient/blob/ma...
and here:
https://github.com/yiisoft/yii2-authclient/blob/ma...
An error occurs while logging in:

PHP Notice – yii\base\ErrorException
Undefined index: login

It works on this piece of code:
$password = Yii::$app->security->generateRandomString(6);
                    $user = new User([
                        'username' => $attributes['login'],
                        'email' => $attributes['email'],
                        'password' => $password,
                    ]);

How can the problem be solved?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fgbxfbx xfdbxfb, 2018-05-06
@niger102

Disable notes. or check $attributes for null before writing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question