* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Exception; use Symfony\Component\Security\Core\User\UserInterface; /** * AccountStatusException is the base class for authentication exceptions * caused by the user account status. * * @author Fabien Potencier * @author Alexander */ abstract class AccountStatusException extends AuthenticationException { private $user; /** * Get the user. * * @return UserInterface */ public function getUser() { return $this->user; } /** * Set the user. * * @param UserInterface $user */ public function setUser(UserInterface $user) { $this->user = $user; } /** * {@inheritDoc} */ public function serialize() { return serialize(array( $this->user, parent::serialize(), )); } /** * {@inheritDoc} */ public function unserialize($str) { list($this->user, $parentData) = unserialize($str); parent::unserialize($parentData); } }