@@ -91,18 +91,18 @@ public static function isGuest()
91
91
/**
92
92
* Handles access for non-logged users (block access)
93
93
* @param string $location
94
- * @param string $role
94
+ * @param string $roleParam
95
95
* @return string|void
96
96
*/
97
- public static function handleLogin ($ location = 'index/index ' , $ role = '' )
97
+ public static function handleLogin ($ location = 'index/index ' , $ roleParam = '' )
98
98
{
99
- if (APPHP_MODE == 'test ' ) return '' ;
99
+ if (APPHP_MODE === 'test ' ) return '' ;
100
100
101
101
$ isLoggedIn = false ;
102
- if (empty ($ role )) {
102
+ if (empty ($ roleParam )) {
103
103
$ isLoggedIn = self ::isLoggedInAsAdmin ();
104
104
} else {
105
- $ roles = explode (', ' , $ role );
105
+ $ roles = explode (', ' , $ roleParam );
106
106
foreach ($ roles as $ role ) {
107
107
if (self ::isLoggedInAs ($ role )) {
108
108
$ isLoggedIn = true ;
@@ -120,18 +120,18 @@ public static function handleLogin($location = 'index/index', $role = '')
120
120
/**
121
121
* Handles access for logged in users (redirect logged in users)
122
122
* @param string $location
123
- * @param string $role
123
+ * @param string $roleParam
124
124
* @return string|void
125
125
*/
126
- public static function handleLoggedIn ($ location = '' , $ role = '' )
126
+ public static function handleLoggedIn ($ location = '' , $ roleParam = '' )
127
127
{
128
- if (APPHP_MODE == 'test ' ) return '' ;
128
+ if (APPHP_MODE === 'test ' ) return '' ;
129
129
130
130
$ isLoggedIn = false ;
131
- if (empty ($ role )) {
131
+ if (empty ($ roleParam )) {
132
132
$ isLoggedIn = self ::isLoggedInAsAdmin ();
133
133
} else {
134
- $ roles = explode (', ' , $ role );
134
+ $ roles = explode (', ' , $ roleParam );
135
135
foreach ($ roles as $ role ) {
136
136
if (self ::isLoggedInAs ($ role )) {
137
137
$ isLoggedIn = true ;
0 commit comments