Many more function case mismatches
[lhc/web/wiklou.git] / includes / user / User.php
index 68a169a..e553ddc 100644 (file)
@@ -858,8 +858,6 @@ class User implements IDBAccessObject {
                        || strlen( $name ) > $wgMaxNameChars
                        || $name != $wgContLang->ucfirst( $name )
                ) {
-                       wfDebugLog( 'username', __METHOD__ .
-                               ": '$name' invalid due to empty, IP, slash, length, or lowercase" );
                        return false;
                }
 
@@ -869,8 +867,6 @@ class User implements IDBAccessObject {
                if ( is_null( $parsed )
                        || $parsed->getNamespace()
                        || strcmp( $name, $parsed->getPrefixedText() ) ) {
-                       wfDebugLog( 'username', __METHOD__ .
-                               ": '$name' invalid due to ambiguous prefixes" );
                        return false;
                }
 
@@ -885,8 +881,6 @@ class User implements IDBAccessObject {
                        '\x{e000}-\x{f8ff}' . # private use
                        ']/u';
                if ( preg_match( $unicodeBlacklist, $name ) ) {
-                       wfDebugLog( 'username', __METHOD__ .
-                               ": '$name' invalid due to blacklisted characters" );
                        return false;
                }
 
@@ -2168,7 +2162,7 @@ class User implements IDBAccessObject {
                // Get the "last viewed rev" timestamp from the oldest message notification
                $timestamp = $dbr->selectField( 'user_newtalk',
                        'MIN(user_last_timestamp)',
-                       $this->isAnon() ? [ 'user_ip' => $this->getName() ] : [ 'user_id' => $this->getID() ],
+                       $this->isAnon() ? [ 'user_ip' => $this->getName() ] : [ 'user_id' => $this->getId() ],
                        __METHOD__ );
                $rev = $timestamp ? Revision::loadFromTimestamp( $dbr, $utp, $timestamp ) : null;
                return [ [ 'wiki' => wfWikiID(), 'link' => $utp->getLocalURL(), 'rev' => $rev ] ];
@@ -3274,7 +3268,7 @@ class User implements IDBAccessObject {
                if ( $this->getId() ) {
                        $dbw->insert( 'user_groups',
                                [
-                                       'ug_user' => $this->getID(),
+                                       'ug_user' => $this->getId(),
                                        'ug_group' => $group,
                                ],
                                __METHOD__,
@@ -3312,14 +3306,14 @@ class User implements IDBAccessObject {
                $dbw = wfGetDB( DB_MASTER );
                $dbw->delete( 'user_groups',
                        [
-                               'ug_user' => $this->getID(),
+                               'ug_user' => $this->getId(),
                                'ug_group' => $group,
                        ], __METHOD__
                );
                // Remember that the user was in this group
                $dbw->insert( 'user_former_groups',
                        [
-                               'ufg_user' => $this->getID(),
+                               'ufg_user' => $this->getId(),
                                'ufg_group' => $group,
                        ],
                        __METHOD__,
@@ -3344,7 +3338,7 @@ class User implements IDBAccessObject {
         * @return bool
         */
        public function isLoggedIn() {
-               return $this->getID() != 0;
+               return $this->getId() != 0;
        }
 
        /**
@@ -3995,6 +3989,7 @@ class User implements IDBAccessObject {
                if ( $this->isLoggedIn() && $this->isBlocked() ) {
                        return $this->spreadBlock();
                }
+
                return false;
        }