src/User/DataMapper/Mapper/User/UserMapper.php
public function findFromSession(Session $session)
    {
        $this->addWhere('user_email', $session->get('email'));
        $this->addWhere('user_id',    (int) $session->get('id'));
        $this->addWhere('user_is_activated', 1);

        try {
            $user = $this->selectOne();
        } catch (ExceptionNoData $exception) {
            throw new LoginException('Login and / or password is incorrect!', 1000, $exception);
        }

        return $user;
    }
public function findFromSession(Session $session)
    {
        $this->addWhere('user_email', $session->get('email'));
        $this->addWhere('user_id',    (int) $session->get('id'));
        $this->addWhere('user_is_activated', 1);

        try {
            $user = $this->selectOne();
        } catch (ExceptionNoData $exception) {
            throw new LoginException('Login and / or password is incorrect!', 1000, $exception);
        }

        return $user;
    }
public function findFromSession ( Session $ session ) { $ this -> addWhere ( 'user_email' , $ session -> get ( 'email' ) ) ; $ this -> addWhere ( 'user_id' , ( int ) $ session -> get ( 'id' ) ) ; $ this -> addWhere ( 'user_is_activated' , 1 ) ; try { $ user = $ this -> selectOne ( ) ; } catch ( ExceptionNoData $ exception ) { throw new LoginException ( 'Login and / or password is incorrect!' , 1000 , $ exception ) ; } return $ user ; }
Find user with data from Session.

@param  Session $session
@return User
@throws \Exception
Find user with data from Session .