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

<?php
/**
* AuthenticationException
*
* @author Ben LeMasurier <ben@sparkfun.com>
*/
namespace SparkLib\Exception;
class AuthenticationException extends SparkException
{
public function __construct ($redirect = null, $code = 0, Exception $previous = null)
{
$this->_app_name = 'Commerce';
$this->_controller = 'account';
$this->_action = 'login';
if ($redirect instanceof \SparkLib\Application\Link) {
$this->_params = 'redirect=' . $redirect->path(false);
} else if ($redirect) {
$this->_params = 'redirect=' . $redirect;
}
$message = 'Please log in.';
parent::__construct($message, $code, $previous);
}
}