concrete/src/User/User.php
public function recordLogin()
    {
        $app = Application::getFacadeApplication();
        $db = $app['database']->connection();
        $uLastLogin = $db->getOne("select uLastLogin from Users where uID = ?", array($this->uID));

        /** @var \Concrete\Core\Permission\IPService $iph */
        $iph = $app->make('helper/validation/ip');
        $ip = $iph->getRequestIP();
        $db->query("update Users set uLastIP = ?, uLastLogin = ?, uPreviousLogin = ?, uNumLogins = uNumLogins + 1 where uID = ?", array(($ip === false) ? ('') : ($ip->getIp()), time(), $uLastLogin, $this->uID));
    }
public function recordLogin()
    {
        $app = Application::getFacadeApplication();
        $db = $app['database']->connection();
        $uLastLogin = $db->getOne("select uLastLogin from Users where uID = ?", array($this->uID));

        /** @var \Concrete\Core\Permission\IPService $iph */
        $iph = $app->make('helper/validation/ip');
        $ip = $iph->getRequestIP();
        $db->query("update Users set uLastIP = ?, uLastLogin = ?, uPreviousLogin = ?, uNumLogins = uNumLogins + 1 where uID = ?", array(($ip === false) ? ('') : ($ip->getIp()), time(), $uLastLogin, $this->uID));
    }
public function recordLogin ( ) { $ app = Application :: getFacadeApplication ( ) ; $ db = $ app [ 'database' ] -> connection ( ) ; $ uLastLogin = $ db -> getOne ( "select uLastLogin from Users where uID = ?" , array ( $ this -> uID ) ) ; /** @var \Concrete\Core\Permission\IPService $iph */ $ iph = $ app -> make ( 'helper/validation/ip' ) ; $ ip = $ iph -> getRequestIP ( ) ; $ db -> query ( "update Users set uLastIP = ?, uLastLogin = ?, uPreviousLogin = ?, uNumLogins = uNumLogins + 1 where uID = ?" , array ( ( $ ip === false ) ? ( '' ) : ( $ ip -> getIp ( ) ) , time ( ) , $ uLastLogin , $ this -> uID ) ) ; }
Increment number of logins and update login timestamps.

@throws \Exception
Increment number of logins and update login timestamps .