From fe15e23107fbda54a3f856c55189d64900b2e5de Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Mon, 19 Jul 2004 06:35:56 +0000 Subject: [PATCH] Fix Userlogin --- includes/Database.php | 8 ++++---- includes/User.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/Database.php b/includes/Database.php index 3ba89985fd..29d7e96fc3 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -642,11 +642,11 @@ class Database { # If it's a string, adds quotes and backslashes # Otherwise returns as-is function addQuotes( $s ) { - if ( !is_numeric( $s ) ) { - $s = "'" . $this->strencode( $s ) . "'"; - } else if ( is_null( $s ) ) { + if ( is_null( $s ) ) { $s = 'NULL'; - } + } else if ( !is_numeric( $s ) ) { + $s = "'" . $this->strencode( $s ) . "'"; + } return $s; } diff --git a/includes/User.php b/includes/User.php index 9170ce7eed..f31c81bfa7 100644 --- a/includes/User.php +++ b/includes/User.php @@ -81,7 +81,7 @@ class User { $this->mId = $this->mNewtalk = 0; $this->mName = $wgIP; - $this->mEmail = ''; + $this->mRealName = $this->mEmail = ''; $this->mPassword = $this->mNewpassword = ''; $this->mRights = array(); $defOpt = $wgLang->getDefaultUserOptions() ; -- 2.20.1