/** * @inheritdoc */ public function __construct($email = '', $password = '') { parent::__construct($email, $password); if ('advertiser' != $this->getRole()) { throw new APIException('Provided credentials do not belong to an advertiser'); } }
/** * @inheritdoc */ public function __construct($email = '', $password = '') { parent::__construct($email, $password); if ('affiliate' != $this->getRole()) { throw new APIException('Authenticated user is not an affiliate'); } }