mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Accounts
* added config option for external recovery & creation * fixed typos in contribute brick for locale 2
This commit is contained in:
@@ -73,8 +73,13 @@ class AccountPage extends GenericPage
|
|||||||
switch ($this->category[0])
|
switch ($this->category[0])
|
||||||
{
|
{
|
||||||
case 'forgotpassword':
|
case 'forgotpassword':
|
||||||
if (CFG_ACC_AUTH_MODE != AUTH_MODE_SELF) // only recover own accounts
|
if (CFG_ACC_AUTH_MODE != AUTH_MODE_SELF)
|
||||||
|
{
|
||||||
|
if (CFG_ACC_EXT_RECOVER_URL)
|
||||||
|
header('Location: '.CFG_ACC_EXT_RECOVER_URL, true, 302);
|
||||||
|
else
|
||||||
$this->error();
|
$this->error();
|
||||||
|
}
|
||||||
|
|
||||||
$this->tpl = 'acc-recover';
|
$this->tpl = 'acc-recover';
|
||||||
$this->resetPass = false;
|
$this->resetPass = false;
|
||||||
@@ -85,8 +90,13 @@ class AccountPage extends GenericPage
|
|||||||
$this->head = sprintf(Lang::account('recoverPass'), $nStep);
|
$this->head = sprintf(Lang::account('recoverPass'), $nStep);
|
||||||
break;
|
break;
|
||||||
case 'forgotusername':
|
case 'forgotusername':
|
||||||
if (CFG_ACC_AUTH_MODE != AUTH_MODE_SELF) // only recover own accounts
|
if (CFG_ACC_AUTH_MODE != AUTH_MODE_SELF)
|
||||||
|
{
|
||||||
|
if (CFG_ACC_EXT_RECOVER_URL)
|
||||||
|
header('Location: '.CFG_ACC_EXT_RECOVER_URL, true, 302);
|
||||||
|
else
|
||||||
$this->error();
|
$this->error();
|
||||||
|
}
|
||||||
|
|
||||||
$this->tpl = 'acc-recover';
|
$this->tpl = 'acc-recover';
|
||||||
$this->resetPass = false;
|
$this->resetPass = false;
|
||||||
@@ -123,9 +133,17 @@ class AccountPage extends GenericPage
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 'signup':
|
case 'signup':
|
||||||
if (!CFG_ACC_ALLOW_REGISTER || CFG_ACC_AUTH_MODE != AUTH_MODE_SELF)
|
if (!CFG_ACC_ALLOW_REGISTER)
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
||||||
|
if (CFG_ACC_AUTH_MODE != AUTH_MODE_SELF)
|
||||||
|
{
|
||||||
|
if (CFG_ACC_EXT_CREATE_URL)
|
||||||
|
header('Location: '.CFG_ACC_EXT_CREATE_URL, true, 302);
|
||||||
|
else
|
||||||
|
$this->error();
|
||||||
|
}
|
||||||
|
|
||||||
$this->tpl = 'acc-signUp';
|
$this->tpl = 'acc-signUp';
|
||||||
$nStep = 1;
|
$nStep = 1;
|
||||||
if ($this->_post['username'] || $this->_post['password'] || $this->_post['c_password'] || $this->_post['email'])
|
if ($this->_post['username'] || $this->_post['password'] || $this->_post['c_password'] || $this->_post['email'])
|
||||||
|
|||||||
3
setup/updates/1493857753_01.sql
Normal file
3
setup/updates/1493857753_01.sql
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
REPLACE INTO aowow_config VALUES
|
||||||
|
('acc_ext_create_url', '', 3, 0x88, 'default: - if auth mode is not self; link to external account creation'),
|
||||||
|
('acc_ext_recover_url', '', 3, 0x88, 'default: - if auth mode is not self; link to external account recovery');
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
endif;
|
endif;
|
||||||
if (!User::$id):
|
if (!User::$id):
|
||||||
?>
|
?>
|
||||||
<small>Vous n'êtes pas connecté(e). Veuillez vous <a href="?account=siginin">connecter</a> pour envoyer une capture d'écran.</small>
|
<small>Vous n'êtes pas connecté(e). Veuillez vous <a href="?account=signin">connecter</a> pour envoyer une capture d'écran.</small>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
endif;
|
endif;
|
||||||
if (!User::$id):
|
if (!User::$id):
|
||||||
?>
|
?>
|
||||||
<small>Vous n'êtes pas connecté(e). Veuillez vous <a href="?account=siginin">connecter</a> pour envoyer une vidéo.</small>
|
<small>Vous n'êtes pas connecté(e). Veuillez vous <a href="?account=signin">connecter</a> pour envoyer une vidéo.</small>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user