浏览代码

Merge pull request #3535 from shleeable/patch-10

artisan user:create - password must be 6 characters or more
daniel 3 年之前
父节点
当前提交
c25347603b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/Console/Commands/UserCreate.php

+ 5 - 0
app/Console/Commands/UserCreate.php

@@ -84,6 +84,11 @@ class UserCreate extends Command
             exit;
         }
         
+        if (strlen($password) < 6) {
+            $this->error('Must be 6 or more characters, please try again...');
+            exit;
+        }
+        
         $is_admin = $this->confirm('Make this user an admin?');
         $confirm_email = $this->confirm('Manually verify email address?');