Neuron-PHP

MemberAuthenticationFilter extends Filter
in package

Member authentication filter.

Ensures user is authenticated and has member-level access (not admin-only). Also checks for email verification if required. Redirects to login page if not authenticated or to verification page if not verified.

Table of Contents

Properties

$_authentication  : Authentication
$_loginUrl  : string
$_postFn  : Closure|null
$_preFn  : Closure|null
$_redirectParam  : string
$_requireEmailVerification  : bool
$_verifyEmailUrl  : string

Methods

__construct()  : mixed
post()  : mixed|null
pre()  : mixed|null
setLoginUrl()  : self
Set login URL
setRequireEmailVerification()  : self
Set whether email verification is required
setVerifyEmailUrl()  : self
Set verify email URL
checkAuthentication()  : void
Check if user is authenticated and verified

Properties

$_postFn

private Closure|null $_postFn

$_preFn

private Closure|null $_preFn

Methods

__construct()

public __construct(Authentication $authentication[, string $loginUrl = '/login' ][, bool $requireEmailVerification = true ]) : mixed
Parameters
$authentication : Authentication
$loginUrl : string = '/login'
$requireEmailVerification : bool = true

setLoginUrl()

Set login URL

public setLoginUrl(string $loginUrl) : self
Parameters
$loginUrl : string
Return values
self

setRequireEmailVerification()

Set whether email verification is required

public setRequireEmailVerification(bool $require) : self
Parameters
$require : bool
Return values
self

setVerifyEmailUrl()

Set verify email URL

public setVerifyEmailUrl(string $verifyEmailUrl) : self
Parameters
$verifyEmailUrl : string
Return values
self

        
On this page

Search results