public function end(Users $user): bool
    {
        $this->find('users_id = ' . $user->getId())->delete();
        SessionKeys::find('users_id = ' . $user->getId())->delete();

        return true;
    }
public function end(Users $user): bool
    {
        $this->find('users_id = ' . $user->getId())->delete();
        SessionKeys::find('users_id = ' . $user->getId())->delete();

        return true;
    }
public function end ( Users $ user ) : bool { $ this -> find ( 'users_id = ' . $ user -> getId ( ) ) -> delete ( ) ; SessionKeys :: find ( 'users_id = ' . $ user -> getId ( ) ) -> delete ( ) ; return true ; }
Terminates the specified session
It will delete the entry in the sessions table for this session,
remove the corresponding auto-login key and reset the cookies

@param Users $user
@return boolean
Terminates the specified session It will delete the entry in the sessions table for this session remove the corresponding auto - login key and reset the cookies