1
0
Fork 0
forked from mirror/pixelfed

Update UserCreate command, fix is_admin flag

This commit is contained in:
Daniel Supernault 2023-05-15 06:15:09 -06:00
parent af35fe93ac
commit ad25ed6792
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -52,7 +52,7 @@ class UserCreate extends Command
$user->name = $o['name']; $user->name = $o['name'];
$user->email = $o['email']; $user->email = $o['email'];
$user->password = bcrypt($o['password']); $user->password = bcrypt($o['password']);
$user->is_admin = (bool) $o['is_admin']; $user->is_admin = $o['is_admin'] == 'true';
$user->email_verified_at = $o['confirm_email'] ? now() : null; $user->email_verified_at = $o['confirm_email'] ? now() : null;
$user->save(); $user->save();