]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OpenID/finishopenidlogin.php
Remove more contractions
[quix0rs-gnu-social.git] / plugins / OpenID / finishopenidlogin.php
index ff0b35218f5ccb0ecd38208e6771f3cb7970f813..b5d9782945afd3cf604114d8328a487e41ed2b19 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, 2009, Control Yourself, Inc.
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2008, 2009, StatusNet, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -17,9 +17,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
 
-require_once(INSTALLDIR.'/lib/openid.php');
+require_once INSTALLDIR.'/plugins/OpenID/openid.php';
 
 class FinishopenidloginAction extends Action
 {
@@ -217,7 +217,7 @@ class FinishopenidloginAction extends Action
 
         if (!Validate::string($nickname, array('min_length' => 1,
                                                'max_length' => 64,
-                                               'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+                                               'format' => NICKNAME_FMT))) {
             $this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
             return;
         }
@@ -265,7 +265,7 @@ class FinishopenidloginAction extends Action
             $fullname = '';
         }
 
-        if (!empty($sreg['email']) && Validate::email($sreg['email'], true)) {
+        if (!empty($sreg['email']) && Validate::email($sreg['email'], common_config('email', 'check_domain'))) {
             $email = $sreg['email'];
         } else {
             $email = '';
@@ -341,7 +341,7 @@ class FinishopenidloginAction extends Action
     {
         $url = common_get_returnto();
         if ($url) {
-            # We don't have to return to it again
+            # We do not have to return to it again
             common_set_returnto(null);
         } else {
             $url = common_local_url('all',
@@ -389,7 +389,7 @@ class FinishopenidloginAction extends Action
     {
         if (!Validate::string($str, array('min_length' => 1,
                                           'max_length' => 64,
-                                          'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+                                          'format' => NICKNAME_FMT))) {
             return false;
         }
         if (!User::allowed_nickname($str)) {
@@ -410,7 +410,7 @@ class FinishopenidloginAction extends Action
         }
     }
 
-    # We try to use an OpenID URL as a legal Laconica user name in this order
+    # We try to use an OpenID URL as a legal StatusNet user name in this order
     # 1. Plain hostname, like http://evanp.myopenid.com/
     # 2. One element in path, like http://profile.typekey.com/EvanProdromou/
     #    or http://getopenid.com/evanprodromou
@@ -421,7 +421,7 @@ class FinishopenidloginAction extends Action
 
         $parts = parse_url($openid);
 
-        # If any of these parts exist, this won't work
+        # If any of these parts exist, this will not work
 
         foreach ($bad as $badpart) {
             if (array_key_exists($badpart, $parts)) {