fix when gets loaded.
This commit is contained in:
parent
8c35d4d1b0
commit
caa8adae5e
|
@ -69,10 +69,12 @@ class AppController extends Controller {
|
||||||
if ( $zmOptApi != '1' ) {
|
if ( $zmOptApi != '1' ) {
|
||||||
throw new UnauthorizedException(__('API Disabled'));
|
throw new UnauthorizedException(__('API Disabled'));
|
||||||
return;
|
return;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
# For use throughout the app. If not logged in, this will be null.
|
||||||
global $user;
|
global $user;
|
||||||
$user = $this->Session->read('user');
|
$user = $this->Session->read('user');
|
||||||
}
|
|
||||||
// We need to reject methods that are not authenticated
|
// We need to reject methods that are not authenticated
|
||||||
// besides login and logout
|
// besides login and logout
|
||||||
if ( strcasecmp($this->params->action, 'login') &&
|
if ( strcasecmp($this->params->action, 'login') &&
|
||||||
|
|
Loading…
Reference in New Issue