* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ namespace PrestaShop\Module\PsAccounts\Exception\AccountLogin; use PrestaShop\OAuth2\Client\Provider\PrestaShopUser; class AccountLoginException extends \Exception { /** * @var PrestaShopUser|null */ protected $user; /** * @var string */ protected $type = 'error_other'; /** * @param string $message * @param PrestaShopUser|null $user * @param \Exception $previous */ public function __construct( $message = '', PrestaShopUser $user = null, \Exception $previous = null ) { parent::__construct($message, 0, $previous); $this->user = $user; } /** * @return PrestaShopUser|null */ public function getUser() { return $this->user; } /** * @return string */ public function getType() { return $this->type; } }