Browse Source

Check if password is atleast 8 characters long

LogischJo 4 years ago
parent
commit
e5ede534ce
1 changed files with 7 additions and 0 deletions
  1. 7 0
      app/Console/Commands/createUser.php

+ 7 - 0
app/Console/Commands/createUser.php

@@ -45,6 +45,13 @@ class createUser extends Command
 
         $password = $this->option('password') ?? $this->ask('Please specify your password.');
         
+        
+        if (strlen($password) < 8) {
+            print_r('Your password need to be atleast 8 characters long');
+
+            return false;
+        };
+        
         $response = Pterodactyl::getUser($ptero_id);