0

I am using drupal 7 default user_register module, when a user registers with all the required fields, it successfully registers but when I click that user in people> tab his/her profile is displayed in which email is not appearing as you can see in the screen shot. Whereas when I clicked on edit link on the right side of that user email address exists. enter image description here

  • > user_register module. This module is called user not user_register. – ya.teck Sep 7 '15 at 11:12
1
  1. copy the default profile template into your theme directory (the default template I copied is /modules/user/user-profile.tpl.php)
  2. just after the initial insert this code:

    $profile_user = user_load(array('uid' => arg(1)));
    
     if($profile_user) {
    
       print '<h3>Contact Information</h3>';
       print '<dl><dt class="profile-profile_email">Email</dt>';
       print '<dd class="profile-profile_email"><a href="mailto:' . $profile_user->mail . '">' . $profile_user->mail . '</a></dd></dl>';
     }
    
  3. That's it, all your profiles should have email addresses.

0

By default Drupal does not show the Registration email in the User profile. But you can override the default template of the User page with your own template and display the email field.

Alternatively you can use Panels to change the layout and show the Email Field.

One more solution is to add a field email in the User Profile so that users will have a registration email and profile email. Users have more flexibility - they can use the same email or two different addresses. Because in some cases there might be some security issues when the Registration Email is exposed.

Else if you have thought about the consequences of forcing users to reveal their registration email then using Panels is the best and easiest way to show it.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.