mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-20 12:33:27 +02:00
shorten some expressions with ??
This commit is contained in:
@@ -16,10 +16,10 @@ if(!$logged)
|
||||
$twig->display('error_box.html.twig', array('errors' => $errors));
|
||||
|
||||
$twig->display('account.login.html.twig', array(
|
||||
'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null,
|
||||
'redirect' => $_REQUEST['redirect'] ?? null,
|
||||
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
|
||||
'account_login_by' => getAccountLoginByLabel(),
|
||||
'error' => isset($errors[0]) ? $errors[0] : null
|
||||
'error' => $errors[0] ?? null
|
||||
));
|
||||
|
||||
return;
|
||||
|
@@ -63,10 +63,10 @@ if($show_form) {
|
||||
}
|
||||
|
||||
$twig->display('account.change_info.html.twig', array(
|
||||
'countries' => isset($countries) ? $countries : [],
|
||||
'countries' => $countries ?? [],
|
||||
'account_rlname' => $account_rlname,
|
||||
'account_location' => $account_location,
|
||||
'account_country' => isset($account_country) ? $account_country : ''
|
||||
'account_country' => $account_country ?? ''
|
||||
));
|
||||
}
|
||||
?>
|
||||
|
@@ -17,9 +17,9 @@ if(!$logged) {
|
||||
return;
|
||||
}
|
||||
|
||||
$new_password = isset($_POST['newpassword']) ? $_POST['newpassword'] : NULL;
|
||||
$new_password2 = isset($_POST['newpassword2']) ? $_POST['newpassword2'] : NULL;
|
||||
$old_password = isset($_POST['oldpassword']) ? $_POST['oldpassword'] : NULL;
|
||||
$new_password = $_POST['newpassword'] ?? NULL;
|
||||
$new_password2 = $_POST['newpassword2'] ?? NULL;
|
||||
$old_password = $_POST['oldpassword'] ?? NULL;
|
||||
if(empty($new_password) && empty($new_password2) && empty($old_password)) {
|
||||
$twig->display('account.change_password.html.twig');
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$title = 'Confirm Email';
|
||||
|
||||
$hash = isset($_GET['hash']) ? $_GET['hash'] : '';
|
||||
$hash = $_GET['hash'] ?? '';
|
||||
if(empty($hash)) {
|
||||
warning('Please enter email hash code.<br/>If you copied the link, please try again with full link.');
|
||||
return;
|
||||
|
Reference in New Issue
Block a user