Fixed typo in domain checking code

This commit is contained in:
Johannes Starosta 2015-07-13 04:08:52 +02:00
parent 7afb88d496
commit ce319a54aa
1 changed files with 3 additions and 3 deletions

View File

@ -98,11 +98,11 @@ class RegisterController extends Controller {
// FEATURE: allow only from specific email domain
$allowed_domains= $this->config->getAppValue($this->appName, 'allowed_domains','');
if ($allowed_domains !== null || $allowed_domains !== ''){
$allowed_domains= explode (";";$allowed_domains);
$allowed_domains= explode (";",$allowed_domains);
$allowed=false;
$domains='';
foreach ($allowed_domains as $domain ) {
$domains=$domain."\n".$domains;
$domains=$domain.print_unescaped("<br>").$domains;
$maildomain=explode("@",$email)[1];
// valid domain, everythings fine
if ($maildomain === $domain) {
@ -115,7 +115,7 @@ class RegisterController extends Controller {
if ( $allowed === false ) {
return new TemplateResponse('', 'error', array(
'errors' => array(array(
'error' => $this->l10n->t('Only following domain names are allowed:\n'),
'error' => $this->l10n->t('Only following domain names are allowed:'."\n".$domains),
'hint' => ''
))
), 'error');