Index: branches/5.2.x/core/units/helpers/user_helper.php =================================================================== diff -u -N -r14994 -r15012 --- branches/5.2.x/core/units/helpers/user_helper.php (.../user_helper.php) (revision 14994) +++ branches/5.2.x/core/units/helpers/user_helper.php (.../user_helper.php) (revision 15012) @@ -1,6 +1,6 @@ Application->resetCounters('UserSession'); + $this->Application->resetCounters('UserSessions'); $this->_processLoginRedirect('root', $password); $this->_processInterfaceLanguage(); @@ -112,7 +112,7 @@ if (!$remember_login_cookie) { // reset counters - $this->Application->resetCounters('UserSession'); + $this->Application->resetCounters('UserSessions'); $this->_processLoginRedirect($username, $password); $this->_processInterfaceLanguage(); @@ -253,7 +253,7 @@ if ( !isset($cache) ) { $sql = 'SELECT IPRestrictions, GroupId - FROM ' . TABLE_PREFIX . 'PortalGroup + FROM ' . TABLE_PREFIX . 'UserGroups WHERE IPRestrictions IS NOT NULL'; $cache = $this->Conn->GetCol($sql, 'GroupId'); } @@ -299,7 +299,7 @@ $this->event->SetRedirectParam('js_redirect', 1); } - $this->Application->resetCounters('UserSession'); + $this->Application->resetCounters('UserSessions'); $this->Application->Session->SetCookie('remember_login', '', strtotime('-1 hour')); // don't pass user prefix on logout, since resulting url will have broken "env" @@ -323,7 +323,7 @@ } $sql = 'SELECT PortalUserId - FROM ' . TABLE_PREFIX . 'PortalUser + FROM ' . TABLE_PREFIX . 'Users WHERE (Email = %1$s OR Username = %1$s) AND (Password = %2$s)'; return $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($username), $this->Conn->qstr($password) ) ); } @@ -372,7 +372,7 @@ $user_language_id = $is_root ? $this->Application->RecallPersistentVar($language_field) : $object->GetDBField($language_field); $sql = 'SELECT LanguageId, IF(LanguageId = ' . (int)$user_language_id . ', 2, ' . $primary_language_field . ') AS SortKey - FROM ' . TABLE_PREFIX . 'Language + FROM ' . TABLE_PREFIX . 'Languages WHERE Enabled = 1 HAVING SortKey <> 0 ORDER BY SortKey DESC'; @@ -532,7 +532,7 @@ } $sql = 'SELECT PwRequestTime, PortalUserId - FROM ' . TABLE_PREFIX . 'PortalUser + FROM ' . TABLE_PREFIX . 'Users WHERE PwResetConfirm = ' . $this->Conn->qstr( trim($user_code) ); $user_info = $this->Conn->GetRow($sql); @@ -567,7 +567,7 @@ } $sql = 'SELECT PortalUserId, PrevEmails - FROM ' . TABLE_PREFIX . 'PortalUser + FROM ' . TABLE_PREFIX . 'Users WHERE PrevEmails LIKE ' . $this->Conn->qstr('%' . $hash . '%'); $user_info = $this->Conn->GetRow($sql);