mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Add password login option for some users, and further refinements to artwork management system
This commit is contained in:
parent
8a1b11b815
commit
5a1c05d8c5
22 changed files with 234 additions and 150 deletions
|
@ -38,7 +38,14 @@ if($GLOBALS['User'] === null){
|
|||
|
||||
$session = new Session();
|
||||
try{
|
||||
$session->Create($httpBasicAuthLogin);
|
||||
$password = $_SERVER['PHP_AUTH_PW'] ?? null;
|
||||
if($password == ''){
|
||||
$password = null;
|
||||
}
|
||||
|
||||
// Most patrons have a null password, meaning they only need to log in using an email and a blank password.
|
||||
// Some users with admin rights need a password to log in.
|
||||
$session->Create($httpBasicAuthLogin, $password);
|
||||
$GLOBALS['User'] = $session->User;
|
||||
}
|
||||
catch(Exception){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue