[buddypress-trac] [BuddyPress] #3114: Action in bp_core_screen_general_settings for validating email
    buddypress-trac at lists.automattic.com 
    buddypress-trac at lists.automattic.com
       
    Tue Mar 15 21:45:35 UTC 2011
    
    
  
#3114: Action in bp_core_screen_general_settings for validating email
-----------------------------------------+-----------------------------
 Reporter:  dimitryz                     |      Owner:
     Type:  enhancement                  |     Status:  new
 Priority:  normal                       |  Milestone:  Awaiting Review
Component:  Core                         |    Version:
 Keywords:  email, settings, validation  |
-----------------------------------------+-----------------------------
 The current buddypress version (1.2.8) does not include email validation
 for the settings profile page. A user can enter any value and it will be
 saved.
 Attached is a patch that fixes this problem. It enables the declaration of
 an action function to validate the POSTed email address. If the email
 address is not valid, a function may modify $email_error and set it to
 'true'. Example:
 {{{
 #!php
 function test_settings_email() {
     global $email_error;
     if ( !is_email($_POST['email']) ) {
         $email_error = true;
     }
 }
 add_action('bp_core_screen_general_settings_before_save',
 'test_settings_email', 1);
 }}}
-- 
Ticket URL: <https://trac.buddypress.org/ticket/3114>
BuddyPress <http://buddypress.org/>
BuddyPress
    
    
More information about the buddypress-trac
mailing list