mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
* fixed account email confirm function
* log some error info when mail cannot be send on account create * fixed some weird include possibilities with forum and account actions (verify action name) * twig getLink function will now return with full url (BASE_URL included) * fixed some changelog PHP Notice warning * (internal) shortened message functions
This commit is contained in:
@@ -160,7 +160,6 @@ if($save)
|
||||
$hash = md5(generateRandomString(16, true, true) . $email);
|
||||
$new_account->setCustomField('email_hash', $hash);
|
||||
|
||||
$verify_url = BASE_URL . '?p=account&action=confirm_email&v=' . $hash;
|
||||
$server_name = $config['lua']['serverName'];
|
||||
|
||||
$body_plain = $twig->render('mail.account.verify.plain.html.twig', array(
|
||||
@@ -181,7 +180,8 @@ if($save)
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<br /><p class="error">An error occorred while sending email! Account not created. Try again. Error:<br/>' . $mailer->ErrorInfo . '</p>';
|
||||
error('An error occorred while sending email! Account not created. Try again. Error:<br/>' . $mailer->ErrorInfo . '<br/>More info in system/logs/error.log');
|
||||
log_append('error.log', '[createaccount.php] An error occorred while sending email: ' . $mailer->ErrorInfo . '. Error: ' . print_r(error_get_last(), true));
|
||||
$new_account->delete();
|
||||
}
|
||||
}
|
||||
@@ -200,7 +200,8 @@ if($save)
|
||||
if(_mail($email, 'Your account on ' . $config['lua']['serverName'], $mailBody))
|
||||
echo '<br /><small>These informations were send on email address <b>' . $email . '</b>.';
|
||||
else
|
||||
echo '<br /><p class="error">An error occorred while sending email (<b>' . $email . '</b>)! Error:<br/>' . $mailer->ErrorInfo . '</p>';
|
||||
error('An error occorred while sending email (<b>' . $email . '</b>)! Error:<br/>' . $mailer->ErrorInfo . '<br/>More info in system/logs/error.log');
|
||||
log_append('error.log', '[createaccount.php] An error occorred while sending email: ' . $mailer->ErrorInfo . '. Error: ' . print_r(error_get_last(), true));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user