Make WordPress Core


Ignore:
Timestamp:
11/16/2005 02:54:23 AM (19 years ago)
Author:
ryan
Message:

Pull the values in WP_User::data directly into WP_User so that we don't have to do ->data->blah.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r2995 r3102  
    4949
    5050$profileuser = new WP_User($user_id);
    51 $profiledata = $profileuser->data;
    5251
    5352if (!current_user_can('edit_users')) $errors['head'] = __('You do not have permission to edit this user.');
     
    8180<legend><?php _e('Name'); ?></legend>
    8281<p><label><?php _e('Username: (no editing)'); ?><br />
    83 <input type="text" name="user_login" value="<?php echo $profiledata->user_login; ?>" disabled="disabled" />
     82<input type="text" name="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" />
    8483</label></p>
    8584
     
    9695
    9796<p><label><?php _e('First name:') ?><br />
    98 <input type="text" name="first_name" value="<?php echo $profiledata->first_name ?>" /></label></p>
     97<input type="text" name="first_name" value="<?php echo $profileuser->first_name ?>" /></label></p>
    9998
    10099<p><label><?php _e('Last name:') ?><br />
    101 <input type="text" name="last_name"  value="<?php echo $profiledata->last_name ?>" /></label></p>
     100<input type="text" name="last_name"  value="<?php echo $profileuser->last_name ?>" /></label></p>
    102101
    103102<p><label><?php _e('Nickname:') ?><br />
    104 <input type="text" name="nickname" value="<?php echo $profiledata->nickname ?>" /></label></p>
     103<input type="text" name="nickname" value="<?php echo $profileuser->nickname ?>" /></label></p>
    105104
    106105</p><label><?php _e('Display name publicly as:') ?> <br />
    107106<select name="display_name">
    108 <option value="<?php echo $profiledata->display_name; ?>"><?php echo $profiledata->display_name; ?></option>
    109 <option value="<?php echo $profiledata->nickname ?>"><?php echo $profiledata->nickname ?></option>
    110 <option value="<?php echo $profiledata->user_login ?>"><?php echo $profiledata->user_login ?></option>
    111 <?php if ( !empty( $profiledata->first_name ) ) : ?>
    112 <option value="<?php echo $profiledata->first_name ?>"><?php echo $profiledata->first_name ?></option>
    113 <?php endif; ?>
    114 <?php if ( !empty( $profiledata->last_name ) ) : ?>
    115 <option value="<?php echo $profiledata->last_name ?>"><?php echo $profiledata->last_name ?></option>
    116 <?php endif; ?>
    117 <?php if ( !empty( $profiledata->first_name ) && !empty( $profiledata->last_name ) ) : ?>
    118 <option value="<?php echo $profiledata->first_name." ".$profiledata->last_name ?>"><?php echo $profiledata->first_name." ".$profiledata->last_name ?></option>
    119 <option value="<?php echo $profiledata->last_name." ".$profiledata->first_name ?>"><?php echo $profiledata->last_name." ".$profiledata->first_name ?></option>
     107<option value="<?php echo $profileuser->display_name; ?>"><?php echo $profileuser->display_name; ?></option>
     108<option value="<?php echo $profileuser->nickname ?>"><?php echo $profileuser->nickname ?></option>
     109<option value="<?php echo $profileuser->user_login ?>"><?php echo $profileuser->user_login ?></option>
     110<?php if ( !empty( $profileuser->first_name ) ) : ?>
     111<option value="<?php echo $profileuser->first_name ?>"><?php echo $profileuser->first_name ?></option>
     112<?php endif; ?>
     113<?php if ( !empty( $profileuser->last_name ) ) : ?>
     114<option value="<?php echo $profileuser->last_name ?>"><?php echo $profileuser->last_name ?></option>
     115<?php endif; ?>
     116<?php if ( !empty( $profileuser->first_name ) && !empty( $profileuser->last_name ) ) : ?>
     117<option value="<?php echo $profileuser->first_name." ".$profileuser->last_name ?>"><?php echo $profileuser->first_name." ".$profileuser->last_name ?></option>
     118<option value="<?php echo $profileuser->last_name." ".$profileuser->first_name ?>"><?php echo $profileuser->last_name." ".$profileuser->first_name ?></option>
    120119<?php endif; ?>
    121120</select></label></p>
     
    126125
    127126<p><label><?php _e('E-mail: (required)') ?><br />
    128 <input type="text" name="email" value="<?php echo $profiledata->user_email ?>" /></label></p>
     127<input type="text" name="email" value="<?php echo $profileuser->user_email ?>" /></label></p>
    129128
    130129<p><label><?php _e('Website:') ?><br />
    131 <input type="text" name="url" value="<?php echo $profiledata->user_url ?>" />
     130<input type="text" name="url" value="<?php echo $profileuser->user_url ?>" />
    132131</label></p>
    133132
    134133<p><label><?php _e('AIM:') ?><br />
    135 <input type="text" name="aim" value="<?php echo $profiledata->aim ?>" />
     134<input type="text" name="aim" value="<?php echo $profileuser->aim ?>" />
    136135</label></p>
    137136
    138137<p><label><?php _e('Yahoo IM:') ?><br />
    139 <input type="text" name="yim" value="<?php echo $profiledata->yim ?>" />
     138<input type="text" name="yim" value="<?php echo $profileuser->yim ?>" />
    140139</label></p>
    141140
    142141<p><label><?php _e('Jabber / Google Talk:') ?>
    143 <input type="text" name="jabber" value="<?php echo $profiledata->jabber ?>" /></label>
     142<input type="text" name="jabber" value="<?php echo $profileuser->jabber ?>" /></label>
    144143</p>
    145144</fieldset>
     
    148147<legend><?php _e('About the user'); ?></legend>
    149148<p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>
    150 <p><textarea name="description" rows="5" cols="30"><?php echo $profiledata->description ?></textarea></p>
     149<p><textarea name="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea></p>
    151150</fieldset>
    152151
Note: See TracChangeset for help on using the changeset viewer.