/**
* Maintenance script to create an account and grant it administrator rights
*
- * @addtogroup Maintenance
+ * @file
+ * @ingroup Maintenance
* @author Rob Church <robchur@gmail.com>
*/
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