* added config option for external recovery & creation
 * fixed typos in contribute brick for locale 2
This commit is contained in:
Sarjuuk
2017-05-04 02:29:59 +02:00
parent 00342b0b61
commit dd63a6a2ab
3 changed files with 28 additions and 7 deletions

View File

@@ -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'])

View 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');

View File

@@ -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;
?> ?>