/**
  * After a new user account is created, create a UserProfile instance and store the posted data into it
  */
 public static function onAddNewAccount($user, $byEmail)
 {
     global $wgUserProfileStaff;
     $zu = new UserProfile($user->getId());
     $summary = "Userpage created automatically to associate UserProfile properties with";
     $zu->doEdit(wfMsg('ap_preloadtext'), $summary, EDIT_NEW);
     $zu->updatePropertiesFromRequest(array_keys(UserProfile::$columns));
     // Display a message to the user (after the ajax response page has rendered)
     self::message(wfMsg('userprofile-reg-created'), '1success');
     // Send notification to the staff of the new registration
     $username = $zu->getName();
     foreach ($wgUserProfileStaff as $name => $email) {
         self::sendMail($email, wfMsg('userprofile-notify-newuser', $name, $username), wfMsg('userprofile-notify-newuser-subject', $username));
     }
     return true;
 }