PHP 클래스 Auth, huge

파일 보기 프로젝트 열기: panique/huge 1 사용 예제들

공개 메소드들

메소드 설명
checkAdminAuthentication ( ) The admin authentication flow, just check if the user is logged in (by looking into the session) AND has user role type 7 (currently there's only type 1 (normal user), type 2 (premium user) and 7 (admin)).
checkAuthentication ( ) The normal authentication flow, just check if the user is logged in (by looking into the session).
checkSessionConcurrency ( ) Detects if there is concurrent session (i.e. another user logged in with the same current user credentials), If so, then logout.

메소드 상세

checkAdminAuthentication() 공개 정적인 메소드

If user is not, then he will be redirected to login page and the application is hard-stopped via exit(). Using this method makes only sense in controllers that should only be used by admins.
public static checkAdminAuthentication ( )

checkAuthentication() 공개 정적인 메소드

If user is not, then he will be redirected to login page and the application is hard-stopped via exit().
public static checkAuthentication ( )

checkSessionConcurrency() 공개 정적인 메소드

Detects if there is concurrent session (i.e. another user logged in with the same current user credentials), If so, then logout.
public static checkSessionConcurrency ( )