* 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:
slawkens1
2017-11-12 21:55:12 +01:00
parent 6aa58bddd8
commit 56a01e1e64
9 changed files with 75 additions and 39 deletions

View File

@@ -1,6 +1,7 @@
<?php
/**
* Account confirm mail
* Keept for compability
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
@@ -8,17 +9,8 @@
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Account';
if($action == 'confirm_email')
{
$res = $db->query('SELECT email_hash FROM accounts WHERE email_hash = ' . $db->quote($_GET['v']));
if(!$res->rowCount())
echo '<div class="note">Your email couldn\'t be verified. Please contact staff to do it manually.</div>';
else
{
$db->update('accounts', array('email_verified' => '1'), array('email_hash' => $_GET['v']));
echo '<div class="success">You have now verified your e-mail, this will increase the security of your account. Thank you for doing this.</div>';
}
if($action == 'confirm_email') {
require_once(PAGES . 'account/confirm_email.php');
}
?>