mirror of
https://github.com/standardebooks/web.git
synced 2025-07-20 22:33:57 -04:00
Define some constants to make HTTP input code less wordy
This commit is contained in:
parent
ee7c8343dd
commit
110c091a7b
36 changed files with 87 additions and 86 deletions
|
@ -8,8 +8,8 @@ if($GLOBALS['User'] !== null){
|
|||
exit();
|
||||
}
|
||||
|
||||
$email = HttpInput::Str(HttpVariableSource::Session, 'email');
|
||||
$redirect = HttpInput::Str(HttpVariableSource::Session, 'redirect') ?? HttpInput::Str(HttpVariableSource::Get, 'redirect');
|
||||
$email = HttpInput::Str(SESSION, 'email');
|
||||
$redirect = HttpInput::Str(SESSION, 'redirect') ?? HttpInput::Str(GET, 'redirect');
|
||||
|
||||
$exception = $_SESSION['exception'] ?? null;
|
||||
$passwordRequired = false;
|
||||
|
|
|
@ -9,9 +9,9 @@ try{
|
|||
$requestType = HttpInput::RequestType();
|
||||
|
||||
$session = new Session();
|
||||
$email = HttpInput::Str(HttpVariableSource::Post, 'email');
|
||||
$password = HttpInput::Str(HttpVariableSource::Post, 'password');
|
||||
$redirect = HttpInput::Str(HttpVariableSource::Post, 'redirect');
|
||||
$email = HttpInput::Str(POST, 'email');
|
||||
$password = HttpInput::Str(POST, 'password');
|
||||
$redirect = HttpInput::Str(POST, 'redirect');
|
||||
|
||||
if($redirect === null){
|
||||
$redirect = '/';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue