dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move most of MWCryptHKDF into libs
[lhc/web/wiklou.git]
/
maintenance
/
createAndPromote.php
diff --git
a/maintenance/createAndPromote.php
b/maintenance/createAndPromote.php
index
848c2f7
..
1872716
100644
(file)
--- a/
maintenance/createAndPromote.php
+++ b/
maintenance/createAndPromote.php
@@
-120,7
+120,14
@@
class CreateAndPromote extends Maintenance {
if ( $password ) {
# Try to set the password
try {
if ( $password ) {
# Try to set the password
try {
- $user->setPassword( $password );
+ $status = $user->changeAuthenticationData( [
+ 'username' => $user->getName(),
+ 'password' => $password,
+ 'retype' => $password,
+ ] );
+ if ( !$status->isGood() ) {
+ throw new PasswordError( $status->getWikiText( null, null, 'en' ) );
+ }
if ( $exists ) {
$this->output( "Password set.\n" );
$user->saveSettings();
if ( $exists ) {
$this->output( "Password set.\n" );
$user->saveSettings();