public function login($email, $password) { $user = User::findFirst(['conditions' => 'email = :email:', 'bind' => ['email' => $email]]); if (!$user) { throw new \Vegas\Security\Authentication\Exception\InvalidCredentialException(); } $this->di->get('auth')->authenticate($user, $password); }