mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Fixes for config.account_create_auto_login
This commit is contained in:
parent
3c4e50dbda
commit
ed9d78d2f3
@ -156,9 +156,12 @@ if($save)
|
|||||||
|
|
||||||
if(empty($errors))
|
if(empty($errors))
|
||||||
{
|
{
|
||||||
|
$hasBeenCreatedByEMail = false;
|
||||||
|
|
||||||
$new_account = new OTS_Account();
|
$new_account = new OTS_Account();
|
||||||
if (config('account_login_by_email')) {
|
if (config('account_login_by_email')) {
|
||||||
$new_account->createWithEmail($email);
|
$new_account->createWithEmail($email);
|
||||||
|
$hasBeenCreatedByEMail = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(USE_ACCOUNT_NAME)
|
if(USE_ACCOUNT_NAME)
|
||||||
@ -250,11 +253,17 @@ if($save)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($config['account_create_auto_login']) {
|
if(config('account_create_auto_login')) {
|
||||||
$_POST['account_login'] = USE_ACCOUNT_NAME ? $account_name : $account_id;
|
if ($hasBeenCreatedByEMail) {
|
||||||
|
$_POST['account_login'] = $email;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$_POST['account_login'] = USE_ACCOUNT_NAME ? $account_name : $account_id;
|
||||||
|
}
|
||||||
|
|
||||||
$_POST['password_login'] = $password2;
|
$_POST['password_login'] = $password2;
|
||||||
|
|
||||||
require SYSTEM . 'login.php';
|
require PAGES . 'account/login.php';
|
||||||
header('Location: ' . getLink('account/manage'));
|
header('Location: ' . getLink('account/manage'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user