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