User: Fix loading of user_touched
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 22 Jan 2016 17:49:06 +0000 (12:49 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 22 Jan 2016 17:49:06 +0000 (12:49 -0500)
Always load user_touched from the row if present, don't gate it on
user_email being non-null.

Bug: T124414
Change-Id: I68fcbb560ddfa349b83126298534161971a88871

includes/user/User.php

index 3a20f1f..47e67e5 100644 (file)
@@ -1251,9 +1251,14 @@ class User implements IDBAccessObject {
                        $all = false;
                }
 
+               if ( isset( $row->user_touched ) ) {
+                       $this->mTouched = wfTimestamp( TS_MW, $row->user_touched );
+               } else {
+                       $all = false;
+               }
+
                if ( isset( $row->user_email ) ) {
                        $this->mEmail = $row->user_email;
-                       $this->mTouched = wfTimestamp( TS_MW, $row->user_touched );
                        $this->mToken = $row->user_token;
                        if ( $this->mToken == '' ) {
                                $this->mToken = null;