Localisation updates for core messages from translatewiki.net (2009-07-22 23:12 UTC)
[lhc/web/wiklou.git] / maintenance / createAndPromote.php
index a5a8f88..b55d920 100644 (file)
@@ -36,9 +36,14 @@ if( !is_object( $user ) ) {
        die( 1 );
 }
 
+try {
+       $user->setPassword( $password );
+} catch( PasswordError $pwe ) {
+       $this->error( $pwe->getText(), true );
+}
+
 # Insert the account into the database
 $user->addToDatabase();
-$user->setPassword( $password );
 $user->saveSettings();
 
 # Promote user