X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcreateAndPromote.php;h=c1a2022138c7bcb34ec1717cf1783822df2a3382;hb=902005471f5e863349d568d12a057780463c281e;hp=861b364b68c09059d75969b9d72cda3048569a3b;hpb=a2527f7dc5504b2d1305dd0544f100135ebe70ca;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index 861b364b68..c1a2022138 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -106,6 +106,12 @@ class CreateAndPromote extends Maintenance { } } + if ( !$exists ) { + # Insert the account into the database + $user->addToDatabase(); + $user->saveSettings(); + } + if ( $password ) { # Try to set the password try { @@ -119,12 +125,6 @@ class CreateAndPromote extends Maintenance { } } - if ( !$exists ) { - # Insert the account into the database - $user->addToDatabase(); - $user->saveSettings(); - } - # Promote user array_map( array( $user, 'addGroup' ), $promotions );