public function incrementFailedLogin($iUserId, $expires = 300)
    {
        $oDate = Factory::factory('DateTime');
        $oDate->add(new \DateInterval('PT' . $expires . 'S'));

        $oDb = Factory::service('Database');
        $oDb->set('failed_login_count', '`failed_login_count`+1', false);
        $oDb->set('failed_login_expires', $oDate->format('Y-m-d H:i:s'));
        return $this->update($iUserId);
    }
public function incrementFailedLogin($iUserId, $expires = 300)
    {
        $oDate = Factory::factory('DateTime');
        $oDate->add(new \DateInterval('PT' . $expires . 'S'));

        $oDb = Factory::service('Database');
        $oDb->set('failed_login_count', '`failed_login_count`+1', false);
        $oDb->set('failed_login_expires', $oDate->format('Y-m-d H:i:s'));
        return $this->update($iUserId);
    }
public function incrementFailedLogin ( $ iUserId , $ expires = 300 ) { $ oDate = Factory :: factory ( 'DateTime' ) ; $ oDate -> add ( new \ DateInterval ( 'PT' . $ expires . 'S' ) ) ; $ oDb = Factory :: service ( 'Database' ) ; $ oDb -> set ( 'failed_login_count' , '`failed_login_count`+1' , false ) ; $ oDb -> set ( 'failed_login_expires' , $ oDate -> format ( 'Y-m-d H:i:s' ) ) ; return $ this -> update ( $ iUserId ) ; }
Increment the user's failed logins

@param integer $iUserId The user ID to increment
@param integer $expires How long till the block, if the threshold is reached, expires.

@return boolean
Increment the user s failed logins