[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 require_once ('admin.php'); 3 4 // Get all errors and print as notice 5 if ( isset( $_GET['created'] ) ) 6 bb_admin_notice( __( '<strong>User Created.</strong>' ) ); 7 8 if ( isset( $_GET['updated'] ) ) 9 bb_admin_notice( __( '<strong>User Updated.</strong>' ) ); 10 11 if ( isset( $_GET['action'] ) || isset( $_GET['user_id'] ) && ( 'edit' == $_GET['action'] || 'create' == $_GET['action'] ) ) { 12 13 $edit_user = bb_get_user( bb_get_user_id( $_GET['user_id'] ) ); 14 $user_fields = bb_manage_user_fields( $edit_user ); 15 16 $bb_admin_body_class = 'bb-admin-user-manage'; 17 bb_get_admin_header(); ?> 18 19 <div class="wrap"> 20 <h2><?php _e( 'Edit user' ); ?></h2> 21 22 <?php do_action( 'bb_admin_notices' ); ?> 23 24 <form class="settings" method="post" action=""> 25 <fieldset> 26 <?php 27 foreach ( $user_fields as $field => $args ) { 28 bb_option_form_element( $field, $args ); 29 } 30 ?> 31 <noscript> 32 <?php _e( 'Disabled (requires JavaScript)' ); ?> 33 </noscript> 34 <script type="text/javascript" charset="utf-8"> 35 if (typeof jQuery != 'undefined') { 36 jQuery('#user-login').attr( 'id', 'user_login' ); 37 var meter = ('<div id="pass-strength-result">' + pwsL10n.short + '</div>'); 38 jQuery('#option-pass-strength-fake-input div.inputs input').before( meter ); 39 } else { 40 document.writeln('<?php echo str_replace( "'", "\'", __( 'Disabled.' ) ); ?>') 41 } 42 </script> 43 </fieldset> 44 <fieldset class="submit"> 45 <?php bb_nonce_field( 'user-manage' ); ?> 46 47 <input type="hidden" name="action" value="update" /> 48 <input class="submit" type="submit" name="submit" value="<?php _e( 'Update user' ); ?>" /> 49 </fieldset> 50 </form> 51 </div> 52 53 <?php } else { 54 // Query the users 55 $bb_user_search = new BB_User_Search( @$_GET['usersearch'], @$_GET['page'], @$_GET['userrole'] ); 56 57 $bb_admin_body_class = ' bb-admin-users'; 58 bb_get_admin_header(); ?> 59 60 <div class="wrap"> 61 62 <?php $bb_user_search->display( true, bb_current_user_can( 'edit_users' ) ); ?> 63 64 </div> 65 66 <?php } ?> 67 68 <?php bb_get_admin_footer(); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Dec 7 01:01:35 2017 | Cross-referenced by PHPXref 0.7.1 |