add role user to generated user & update readme

This commit is contained in:
akosse committed 2020-01-29 13:48:06 +03:00
1 parent f647a4905c
commit 6630452a1e
2 files changed
+10

No files matched your search

+4
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);