Add some error box to error

This commit is contained in:
slawkens 2022-11-28 16:42:01 +01:00
parent ba04536169
commit 8af786902d

View File

@ -21,8 +21,10 @@ if(isset($_POST['reg_password']))
$reg_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $_POST['reg_password']); $reg_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $_POST['reg_password']);
$reckey = $account_logged->getCustomField('key'); $reckey = $account_logged->getCustomField('key');
if((!$config['generate_new_reckey'] || !$config['mail_enabled']) || empty($reckey)) if((!$config['generate_new_reckey'] || !$config['mail_enabled']) || empty($reckey)) {
echo 'You cant get new rec key'; $errors[] = 'You cant get new recovery key.';
$twig->display('error_box.html.twig', array('errors' => $errors));
}
else else
{ {
$points = $account_logged->getCustomField('premium_points'); $points = $account_logged->getCustomField('premium_points');
@ -74,5 +76,3 @@ else
)); ));
} }
} }
?>