A modest collection of PHP libraries used at SparkFun.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
672 B

  1. <?php
  2. /**
  3. * AuthenticationException
  4. *
  5. * @author Ben LeMasurier <ben@sparkfun.com>
  6. */
  7. namespace SparkLib\Exception;
  8. class AuthenticationException extends SparkException
  9. {
  10. public function __construct ($redirect = null, $code = 0, Exception $previous = null)
  11. {
  12. $this->_app_name = 'Commerce';
  13. $this->_controller = 'account';
  14. $this->_action = 'login';
  15. if ($redirect instanceof \SparkLib\Application\Link) {
  16. $this->_params = 'redirect=' . $redirect->path(false);
  17. } else if ($redirect) {
  18. $this->_params = 'redirect=' . $redirect;
  19. }
  20. $message = 'Please log in.';
  21. parent::__construct($message, $code, $previous);
  22. }
  23. }