Fix registration flow with email as name

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-08-18 17:30:41 +02:00
parent 150e58880e
commit ff71229016
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ script('registration', 'form');
<img id="email-icon" class="svg" src="<?php print_unescaped(image_path('', 'actions/mail.svg')); ?>" alt=""/>
</p>
<?php if ($_['email_is_login']) { ?>
<?php if (!$_['email_is_login']) { ?>
<p class="groupmiddle">
<input type="text" name="username" id="username" value="<?php if (!empty($_['entered_data']['user'])) {
p($_['entered_data']['user']);
@ -31,6 +31,8 @@ script('registration', 'form');
<label for="username" class="infield"><?php p($l->t('Username')); ?></label>
<img id="username-icon" class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/>
</p>
<?php } else { ?>
<input type="hidden" name="username" value="<?php p($_['email']); ?>" />
<?php } ?>
<p class="groupbottom">