Merge ../BusinessAppTemplate
This commit is contained in:
commit
345f3d0ba0
@ -75,6 +75,18 @@ function authenticate(): bool {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the User whose credentials were used to make the request.
|
||||||
|
*/
|
||||||
|
function getRequestUser(): User {
|
||||||
|
global $VARS;
|
||||||
|
if (!empty($_SERVER['PHP_AUTH_USER'])) {
|
||||||
|
return User::byUsername($_SERVER['PHP_AUTH_USER']);
|
||||||
|
} else {
|
||||||
|
return User::byUsername($VARS['username']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function checkVars($vars, $or = false) {
|
function checkVars($vars, $or = false) {
|
||||||
global $VARS;
|
global $VARS;
|
||||||
$ok = [];
|
$ok = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user