]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apiaccountregister.php
Registration coding cleanup
[quix0rs-gnu-social.git] / actions / apiaccountregister.php
index 9926fc8cf933762c0fd476c94203214d086a0588..b5481df1cba369e239fb9564ab75c85711d359e8 100644 (file)
@@ -163,8 +163,8 @@ class ApiAccountRegisterAction extends ApiAction
                                                        'homepage' => $homepage,
                                                        'bio' => $bio,
                                                        'location' => $location,
-                                                       'code' => $code))) {
-                   if (!$user) {
+                                                       'code' => $this->code))) {
+                   if (!$user instanceof User) {
                        // TRANS: Form validation error displayed when trying to register with an invalid username or password.
                        $this->clientError(_('Invalid username or password.'), 400);
                    }