Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/20/2011 09:38:40 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Allow super admins to skip the XProfile is_required check. Fixes #3593.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-functions.php

    r5032 r5165  
    263263    $field = new BP_Xprofile_Field( $field_id );
    264264
    265     if ( (int)$field->is_required )
    266         return true;
    267 
    268     return false;
     265    // Define locale variable(s)
     266    $retval = false;
     267
     268    // Super admins can skip required check
     269    if ( is_super_admin() )
     270        $retval = false;
     271
     272    // All other users will use the field's setting
     273    elseif ( isset( $field->is_required ) )
     274        $retval = $field->is_required;
     275
     276    return (bool) $retval;
    269277}
    270278
Note: See TracChangeset for help on using the changeset viewer.