]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/registeruser.php
Webfinger instructions were incomplete/erroneous -- now they are not.
[quix0rs-gnu-social.git] / scripts / registeruser.php
index 5d9c8862daf8f1d93681bb8a2bc8f3d47eb757b1..97caf645cd6eb812904d9c68da110e958e30ca49 100644 (file)
@@ -49,7 +49,7 @@ if (empty($nickname) || empty($password)) {
 
 try {
 
-    $user = User::staticGet('nickname', $nickname);
+    $user = User::getKV('nickname', $nickname);
 
     if (!empty($user)) {
         throw new Exception("A user named '$nickname' already exists.");
@@ -69,10 +69,8 @@ try {
 
         $user->email = $email;
 
-        if (!$user->updateKeys($orig)) {
-            print "Failed!\n";
-            throw new Exception("Can't update email address.");
-        }
+        // Throws exception on failure.
+        $user->updateWithKeys($orig);
     }
 
 } catch (Exception $e) {