public function deleteSession($user_id)
    {
        if (!isset($_SESSION['admin_sid'])) {
            return true;
        }
        $user_id = (int)$user_id;

        $sessions = new UsersSessionEntityRepository();
        $sessions->setWhereUserId($user_id);
        $sessions->setWhereSid($_SESSION['admin_sid']);
        $sessions->deleteObjectCollection();

        return true;
    }
public function deleteSession($user_id)
    {
        if (!isset($_SESSION['admin_sid'])) {
            return true;
        }
        $user_id = (int)$user_id;

        $sessions = new UsersSessionEntityRepository();
        $sessions->setWhereUserId($user_id);
        $sessions->setWhereSid($_SESSION['admin_sid']);
        $sessions->deleteObjectCollection();

        return true;
    }
public function deleteSession ( $ user_id ) { if ( ! isset ( $ _SESSION [ 'admin_sid' ] ) ) { return true ; } $ user_id = ( int ) $ user_id ; $ sessions = new UsersSessionEntityRepository ( ) ; $ sessions -> setWhereUserId ( $ user_id ) ; $ sessions -> setWhereSid ( $ _SESSION [ 'admin_sid' ] ) ; $ sessions -> deleteObjectCollection ( ) ; return true ; }
Removes current session, logs out admin user

@param int $user_id

@return bool
Removes current session logs out admin user