Page MenuHomePhabricator

createAndPromote.php no longer makes passwords
Closed, ResolvedPublic

Description

Does createAndPromote.php still work?

$ php createAndPromote.php Fff zzz
Creating and promoting User:Fff...done.

But mysql shows

        user_name: Fff
   user_real_name:
    user_password:
 user_newpassword:
user_newpass_time: 20071226000912

and indeed the new user cannot login with the password or no passwd at
all.

One needs to use changePassword.php as an extra step.

P.S., if one gives fff, Fff is created, but the message on stdout
doesn't reflect that.

By the way, you might take this opportunity to make a more general
command that can create regular users too.

e.g., for

wiki=wiki.example.org
while read user email
do

password=$RANDOM
php createAndPromote.php $user $password &&
echo Dear $user, your initial password is $password on $wiki|
mail -s $wiki\ account $email

done < classmates


Version: 1.11.x
Severity: enhancement

Details

Reference
bz12416

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:55 PM
bzimport set Reference to bz12416.
bzimport added a subscriber: Unknown Object (MLST).

User::setPassword() currently doesn't have immediate application and requires a subsequent call to saveSettings().

Have added this in r28914.