Need to always include auth.php, as it has functions like canView
parent
2e58ea1a42
commit
d75364ff53
|
@ -66,11 +66,10 @@ class AppController extends Controller {
|
||||||
|
|
||||||
# For use throughout the app. If not logged in, this will be null.
|
# For use throughout the app. If not logged in, this will be null.
|
||||||
global $user;
|
global $user;
|
||||||
|
# This will auto-login if username=&password= are set, or auth=
|
||||||
|
require_once __DIR__ .'/../../../includes/auth.php';
|
||||||
|
|
||||||
if ( ZM_OPT_USE_AUTH ) {
|
if ( ZM_OPT_USE_AUTH ) {
|
||||||
# This will auto-login if username=&password= are set, or auth=
|
|
||||||
require_once __DIR__ .'/../../../includes/auth.php';
|
|
||||||
|
|
||||||
if ( ZM_OPT_USE_LEGACY_API_AUTH or !strcasecmp($this->params->action, 'login') ) {
|
if ( ZM_OPT_USE_LEGACY_API_AUTH or !strcasecmp($this->params->action, 'login') ) {
|
||||||
# This is here because historically we allowed user=&pass= in the api. web-ui auth uses username=&password=
|
# This is here because historically we allowed user=&pass= in the api. web-ui auth uses username=&password=
|
||||||
$username = $this->request->query('user') ? $this->request->query('user') : $this->request->data('user');
|
$username = $this->request->query('user') ? $this->request->query('user') : $this->request->data('user');
|
||||||
|
|
Loading…
Reference in New Issue