add role user to generated user & update readme

This commit is contained in:
akosse
2020-01-29 13:48:06 +03:00
parent f647a4905c
commit 6630452a1e
2 changed files with 10 additions and 0 deletions

View File

@ -126,6 +126,10 @@ class UserCard extends \common\models\UserCard
$user->save();
$auth = Yii::$app->authManager;
$authorRole = $auth->getRole('user');
$auth->assign($authorRole, $user->id);
$log = "Логин: " . $email . " Пароль: " . $password . " | ";
file_put_contents("log.txt", $log, FILE_APPEND | LOCK_EX);