Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Prevent users from changing email addresses (4 posts)

Started 6 months ago by: Rob Sbaglia

  • Profile picture of Rob Sbaglia Rob Sbaglia said 6 months ago:

    Hello,
    I am running a wordpress network with Buddypress on top for a school. To ensure I see all private messages etc between students, I have issued the users email address that I have access to (and they don’t). I want to prevent users from changing their email addresses once they are registered with the ‘school’ email address.
    I’ve managed to prevent this from the ‘dashboard’ side of things, but users can still change their email addresses through the profile edit part of buddypress.
    Any help would be highly valued.
    Cheers,
    Rob.

  • Profile picture of unknown89 unknown89 said 6 months ago:

    Hi, if you wish to remove this – simply go to your child theme – look for the following folders

    members/single/settings and find the file called general.php

    inside of that file, scroll down until you see the input fields for the Account Email – and comment that out

  • Profile picture of unknown89 unknown89 said 6 months ago:

    Look for

    <label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></lable>
    <input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input" />

    And add the following to the beginning and end

    <!-- <label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></label>
    <input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input" /> //-->
  • Profile picture of Rob Sbaglia Rob Sbaglia said 5 months, 2 weeks ago:

    Thank you thank you thank you!

    Sorry it took me so long to get back to this, I expected to get an email to say the forum post had been replied to, but obviously not.

    Cheers,
    Rob.