}
}
+ if ( !$exists ) {
+ # Insert the account into the database
+ $user->addToDatabase();
+ $user->saveSettings();
+ }
+
if ( $password ) {
# Try to set the password
try {
}
}
- if ( !$exists ) {
- # Insert the account into the database
- $user->addToDatabase();
- $user->saveSettings();
- }
-
# Promote user
array_map( array( $user, 'addGroup' ), $promotions );