Skip to content

Commit

Permalink
Include realname field in verify.php
Browse files Browse the repository at this point in the history
Show realname field in account verification, and allow the user to
modify their real name in the same page.

This is useful for self registration, where real name is created blank.
So even if real name is not required, there is more chances that the
user fills in their name on first activation.
  • Loading branch information
cproensa authored and dregad committed May 14, 2016
1 parent edb5882 commit 8fadfb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions account_update.php
Expand Up @@ -101,9 +101,7 @@
}

# Update real name (but only if LDAP isn't being used)
# Do not update real name for a user verification
if( !( $t_ldap && config_get( 'use_ldap_realname' ) )
&& !$t_account_verification ) {
if( !( $t_ldap && config_get( 'use_ldap_realname' ) ) ) {
# strip extra spaces from real name
$t_realname = string_normalize( $f_realname );
if( $t_realname != user_get_field( $t_user_id, 'realname' ) ) {
Expand Down
7 changes: 7 additions & 0 deletions verify.php
Expand Up @@ -121,6 +121,13 @@
# When verifying account, set a token and don't display current password
token_set( TOKEN_ACCOUNT_VERIFY, true, TOKEN_EXPIRY_AUTHENTICATED, $u_id );
?>
<div class="field-container">
<label for="realname"><span><?php echo lang_get( 'realname' ) ?></span></label>
<span class="input">
<input id="realname" type="text" size="32" maxlength="<?php echo DB_FIELD_SIZE_REALNAME ?>" name="realname" value="<?php echo string_attribute( $u_realname ) ?>" />
</span>
<span class="label-style"></span>
</div>
<div class="field-container">
<label for="password" class="required"><span><?php echo lang_get( 'new_password' ) ?></span></label>
<span class="input"><input id="password" type="password" name="password" size="32" maxlength="<?php echo auth_get_password_max_size(); ?>" /></span>
Expand Down

0 comments on commit 8fadfb2

Please sign in to comment.