Pull the values in WP_User::data directly into WP_User so that we don't have to do ->data->blah.
git-svn-id: https://develop.svn.wordpress.org/trunk@3102 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b8f0875533
commit
62f1fd972b
@ -6,7 +6,6 @@ $title = 'Profile';
|
|||||||
$parent_file = 'profile.php';
|
$parent_file = 'profile.php';
|
||||||
include_once('admin-header.php');
|
include_once('admin-header.php');
|
||||||
$profileuser = new WP_User($user_ID);
|
$profileuser = new WP_User($user_ID);
|
||||||
$profiledata = &$profileuser->data;
|
|
||||||
|
|
||||||
$bookmarklet_height= 440;
|
$bookmarklet_height= 440;
|
||||||
?>
|
?>
|
||||||
@ -28,32 +27,32 @@ $bookmarklet_height= 440;
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php _e('Name'); ?></legend>
|
<legend><?php _e('Name'); ?></legend>
|
||||||
<p><label><?php _e('Username: (no editing)'); ?><br />
|
<p><label><?php _e('Username: (no editing)'); ?><br />
|
||||||
<input type="text" name="user_login" value="<?php echo $profiledata->user_login; ?>" disabled="disabled" />
|
<input type="text" name="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('First name:') ?><br />
|
<p><label><?php _e('First name:') ?><br />
|
||||||
<input type="text" name="first_name" value="<?php echo $profiledata->first_name ?>" /></label></p>
|
<input type="text" name="first_name" value="<?php echo $profileuser->first_name ?>" /></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Last name:') ?><br />
|
<p><label><?php _e('Last name:') ?><br />
|
||||||
<input type="text" name="last_name" value="<?php echo $profiledata->last_name ?>" /></label></p>
|
<input type="text" name="last_name" value="<?php echo $profileuser->last_name ?>" /></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Nickname:') ?><br />
|
<p><label><?php _e('Nickname:') ?><br />
|
||||||
<input type="text" name="nickname" value="<?php echo $profiledata->nickname ?>" /></label></p>
|
<input type="text" name="nickname" value="<?php echo $profileuser->nickname ?>" /></label></p>
|
||||||
|
|
||||||
</p><label><?php _e('Display name publicly as:') ?> <br />
|
</p><label><?php _e('Display name publicly as:') ?> <br />
|
||||||
<select name="display_name">
|
<select name="display_name">
|
||||||
<option value="<?php echo $profiledata->display_name; ?>"><?php echo $profiledata->display_name; ?></option>
|
<option value="<?php echo $profileuser->display_name; ?>"><?php echo $profileuser->display_name; ?></option>
|
||||||
<option value="<?php echo $profiledata->nickname ?>"><?php echo $profiledata->nickname ?></option>
|
<option value="<?php echo $profileuser->nickname ?>"><?php echo $profileuser->nickname ?></option>
|
||||||
<option value="<?php echo $profiledata->user_login ?>"><?php echo $profiledata->user_login ?></option>
|
<option value="<?php echo $profileuser->user_login ?>"><?php echo $profileuser->user_login ?></option>
|
||||||
<?php if ( !empty( $profiledata->first_name ) ) : ?>
|
<?php if ( !empty( $profileuser->first_name ) ) : ?>
|
||||||
<option value="<?php echo $profiledata->first_name ?>"><?php echo $profiledata->first_name ?></option>
|
<option value="<?php echo $profileuser->first_name ?>"><?php echo $profileuser->first_name ?></option>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( !empty( $profiledata->last_name ) ) : ?>
|
<?php if ( !empty( $profileuser->last_name ) ) : ?>
|
||||||
<option value="<?php echo $profiledata->last_name ?>"><?php echo $profiledata->last_name ?></option>
|
<option value="<?php echo $profileuser->last_name ?>"><?php echo $profileuser->last_name ?></option>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( !empty( $profiledata->first_name ) && !empty( $profiledata->last_name ) ) : ?>
|
<?php if ( !empty( $profileuser->first_name ) && !empty( $profileuser->last_name ) ) : ?>
|
||||||
<option value="<?php echo $profiledata->first_name." ".$profiledata->last_name ?>"><?php echo $profiledata->first_name." ".$profiledata->last_name ?></option>
|
<option value="<?php echo $profileuser->first_name." ".$profileuser->last_name ?>"><?php echo $profileuser->first_name." ".$profileuser->last_name ?></option>
|
||||||
<option value="<?php echo $profiledata->last_name." ".$profiledata->first_name ?>"><?php echo $profiledata->last_name." ".$profiledata->first_name ?></option>
|
<option value="<?php echo $profileuser->last_name." ".$profileuser->first_name ?>"><?php echo $profileuser->last_name." ".$profileuser->first_name ?></option>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</select></label></p>
|
</select></label></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@ -62,29 +61,29 @@ $bookmarklet_height= 440;
|
|||||||
<legend><?php _e('Contact Info'); ?></legend>
|
<legend><?php _e('Contact Info'); ?></legend>
|
||||||
|
|
||||||
<p><label><?php _e('E-mail: (required)') ?><br />
|
<p><label><?php _e('E-mail: (required)') ?><br />
|
||||||
<input type="text" name="email" value="<?php echo $profiledata->user_email ?>" /></label></p>
|
<input type="text" name="email" value="<?php echo $profileuser->user_email ?>" /></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Website:') ?><br />
|
<p><label><?php _e('Website:') ?><br />
|
||||||
<input type="text" name="url" value="<?php echo $profiledata->user_url ?>" />
|
<input type="text" name="url" value="<?php echo $profileuser->user_url ?>" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('AIM:') ?><br />
|
<p><label><?php _e('AIM:') ?><br />
|
||||||
<input type="text" name="aim" value="<?php echo $profiledata->aim ?>" />
|
<input type="text" name="aim" value="<?php echo $profileuser->aim ?>" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Yahoo IM:') ?><br />
|
<p><label><?php _e('Yahoo IM:') ?><br />
|
||||||
<input type="text" name="yim" value="<?php echo $profiledata->yim ?>" />
|
<input type="text" name="yim" value="<?php echo $profileuser->yim ?>" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Jabber / Google Talk:') ?>
|
<p><label><?php _e('Jabber / Google Talk:') ?>
|
||||||
<input type="text" name="jabber" value="<?php echo $profiledata->jabber ?>" /></label>
|
<input type="text" name="jabber" value="<?php echo $profileuser->jabber ?>" /></label>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<br clear="all" />
|
<br clear="all" />
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php _e('About yourself'); ?></legend>
|
<legend><?php _e('About yourself'); ?></legend>
|
||||||
<p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>
|
<p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>
|
||||||
<p><textarea name="description" rows="5" cols="30"><?php echo $profiledata->description ?></textarea></p>
|
<p><textarea name="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -48,7 +48,6 @@ default:
|
|||||||
include ('admin-header.php');
|
include ('admin-header.php');
|
||||||
|
|
||||||
$profileuser = new WP_User($user_id);
|
$profileuser = new WP_User($user_id);
|
||||||
$profiledata = $profileuser->data;
|
|
||||||
|
|
||||||
if (!current_user_can('edit_users')) $errors['head'] = __('You do not have permission to edit this user.');
|
if (!current_user_can('edit_users')) $errors['head'] = __('You do not have permission to edit this user.');
|
||||||
?>
|
?>
|
||||||
@ -80,7 +79,7 @@ if (!current_user_can('edit_users')) $errors['head'] = __('You do not have permi
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php _e('Name'); ?></legend>
|
<legend><?php _e('Name'); ?></legend>
|
||||||
<p><label><?php _e('Username: (no editing)'); ?><br />
|
<p><label><?php _e('Username: (no editing)'); ?><br />
|
||||||
<input type="text" name="user_login" value="<?php echo $profiledata->user_login; ?>" disabled="disabled" />
|
<input type="text" name="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Role:') ?><br />
|
<p><label><?php _e('Role:') ?><br />
|
||||||
@ -95,28 +94,28 @@ echo '</select>';
|
|||||||
?></label></p>
|
?></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('First name:') ?><br />
|
<p><label><?php _e('First name:') ?><br />
|
||||||
<input type="text" name="first_name" value="<?php echo $profiledata->first_name ?>" /></label></p>
|
<input type="text" name="first_name" value="<?php echo $profileuser->first_name ?>" /></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Last name:') ?><br />
|
<p><label><?php _e('Last name:') ?><br />
|
||||||
<input type="text" name="last_name" value="<?php echo $profiledata->last_name ?>" /></label></p>
|
<input type="text" name="last_name" value="<?php echo $profileuser->last_name ?>" /></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Nickname:') ?><br />
|
<p><label><?php _e('Nickname:') ?><br />
|
||||||
<input type="text" name="nickname" value="<?php echo $profiledata->nickname ?>" /></label></p>
|
<input type="text" name="nickname" value="<?php echo $profileuser->nickname ?>" /></label></p>
|
||||||
|
|
||||||
</p><label><?php _e('Display name publicly as:') ?> <br />
|
</p><label><?php _e('Display name publicly as:') ?> <br />
|
||||||
<select name="display_name">
|
<select name="display_name">
|
||||||
<option value="<?php echo $profiledata->display_name; ?>"><?php echo $profiledata->display_name; ?></option>
|
<option value="<?php echo $profileuser->display_name; ?>"><?php echo $profileuser->display_name; ?></option>
|
||||||
<option value="<?php echo $profiledata->nickname ?>"><?php echo $profiledata->nickname ?></option>
|
<option value="<?php echo $profileuser->nickname ?>"><?php echo $profileuser->nickname ?></option>
|
||||||
<option value="<?php echo $profiledata->user_login ?>"><?php echo $profiledata->user_login ?></option>
|
<option value="<?php echo $profileuser->user_login ?>"><?php echo $profileuser->user_login ?></option>
|
||||||
<?php if ( !empty( $profiledata->first_name ) ) : ?>
|
<?php if ( !empty( $profileuser->first_name ) ) : ?>
|
||||||
<option value="<?php echo $profiledata->first_name ?>"><?php echo $profiledata->first_name ?></option>
|
<option value="<?php echo $profileuser->first_name ?>"><?php echo $profileuser->first_name ?></option>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( !empty( $profiledata->last_name ) ) : ?>
|
<?php if ( !empty( $profileuser->last_name ) ) : ?>
|
||||||
<option value="<?php echo $profiledata->last_name ?>"><?php echo $profiledata->last_name ?></option>
|
<option value="<?php echo $profileuser->last_name ?>"><?php echo $profileuser->last_name ?></option>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( !empty( $profiledata->first_name ) && !empty( $profiledata->last_name ) ) : ?>
|
<?php if ( !empty( $profileuser->first_name ) && !empty( $profileuser->last_name ) ) : ?>
|
||||||
<option value="<?php echo $profiledata->first_name." ".$profiledata->last_name ?>"><?php echo $profiledata->first_name." ".$profiledata->last_name ?></option>
|
<option value="<?php echo $profileuser->first_name." ".$profileuser->last_name ?>"><?php echo $profileuser->first_name." ".$profileuser->last_name ?></option>
|
||||||
<option value="<?php echo $profiledata->last_name." ".$profiledata->first_name ?>"><?php echo $profiledata->last_name." ".$profiledata->first_name ?></option>
|
<option value="<?php echo $profileuser->last_name." ".$profileuser->first_name ?>"><?php echo $profileuser->last_name." ".$profileuser->first_name ?></option>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</select></label></p>
|
</select></label></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@ -125,29 +124,29 @@ echo '</select>';
|
|||||||
<legend><?php _e('Contact Info'); ?></legend>
|
<legend><?php _e('Contact Info'); ?></legend>
|
||||||
|
|
||||||
<p><label><?php _e('E-mail: (required)') ?><br />
|
<p><label><?php _e('E-mail: (required)') ?><br />
|
||||||
<input type="text" name="email" value="<?php echo $profiledata->user_email ?>" /></label></p>
|
<input type="text" name="email" value="<?php echo $profileuser->user_email ?>" /></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Website:') ?><br />
|
<p><label><?php _e('Website:') ?><br />
|
||||||
<input type="text" name="url" value="<?php echo $profiledata->user_url ?>" />
|
<input type="text" name="url" value="<?php echo $profileuser->user_url ?>" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('AIM:') ?><br />
|
<p><label><?php _e('AIM:') ?><br />
|
||||||
<input type="text" name="aim" value="<?php echo $profiledata->aim ?>" />
|
<input type="text" name="aim" value="<?php echo $profileuser->aim ?>" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Yahoo IM:') ?><br />
|
<p><label><?php _e('Yahoo IM:') ?><br />
|
||||||
<input type="text" name="yim" value="<?php echo $profiledata->yim ?>" />
|
<input type="text" name="yim" value="<?php echo $profileuser->yim ?>" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Jabber / Google Talk:') ?>
|
<p><label><?php _e('Jabber / Google Talk:') ?>
|
||||||
<input type="text" name="jabber" value="<?php echo $profiledata->jabber ?>" /></label>
|
<input type="text" name="jabber" value="<?php echo $profileuser->jabber ?>" /></label>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<br clear="all" />
|
<br clear="all" />
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php _e('About the user'); ?></legend>
|
<legend><?php _e('About the user'); ?></legend>
|
||||||
<p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>
|
<p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>
|
||||||
<p><textarea name="description" rows="5" cols="30"><?php echo $profiledata->description ?></textarea></p>
|
<p><textarea name="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -95,9 +95,9 @@ case 'delete':
|
|||||||
foreach ($userids as $id) {
|
foreach ($userids as $id) {
|
||||||
$user = new WP_User($id);
|
$user = new WP_User($id);
|
||||||
if ($id == $current_user->id) {
|
if ($id == $current_user->id) {
|
||||||
echo "<li>" . sprintf('ID #%1s: %2s <strong>The current user will not be deleted.</strong>', $id, $user->data->user_login) . "</li>\n";
|
echo "<li>" . sprintf('ID #%1s: %2s <strong>The current user will not be deleted.</strong>', $id, $user->user_login) . "</li>\n";
|
||||||
} else {
|
} else {
|
||||||
echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf('ID #%1s: %2s', $id, $user->data->user_login) . "</li>\n";
|
echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf('ID #%1s: %2s', $id, $user->user_login) . "</li>\n";
|
||||||
$go_delete = true;
|
$go_delete = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ default:
|
|||||||
$tmp_user = new WP_User($userid);
|
$tmp_user = new WP_User($userid);
|
||||||
$roles = $tmp_user->roles;
|
$roles = $tmp_user->roles;
|
||||||
$role = $roles[0];
|
$role = $roles[0];
|
||||||
$roleclasses[$role][$tmp_user->data->user_login] = $tmp_user;
|
$roleclasses[$role][$tmp_user->user_login] = $tmp_user;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -225,9 +225,8 @@ default:
|
|||||||
<?php
|
<?php
|
||||||
$style = '';
|
$style = '';
|
||||||
foreach ($roleclass as $user_object) {
|
foreach ($roleclass as $user_object) {
|
||||||
$user_data = &$user_object->data;
|
$email = $user_object->user_email;
|
||||||
$email = $user_data->user_email;
|
$url = $user_object->user_url;
|
||||||
$url = $user_data->user_url;
|
|
||||||
$short_url = str_replace('http://', '', $url);
|
$short_url = str_replace('http://', '', $url);
|
||||||
$short_url = str_replace('www.', '', $short_url);
|
$short_url = str_replace('www.', '', $short_url);
|
||||||
if ('/' == substr($short_url, -1))
|
if ('/' == substr($short_url, -1))
|
||||||
@ -235,19 +234,19 @@ default:
|
|||||||
if (strlen($short_url) > 35)
|
if (strlen($short_url) > 35)
|
||||||
$short_url = substr($short_url, 0, 32).'...';
|
$short_url = substr($short_url, 0, 32).'...';
|
||||||
$style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
|
$style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
|
||||||
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$user_data->ID' and post_status = 'publish'");
|
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$user_object->ID' and post_status = 'publish'");
|
||||||
if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_data->ID' title='" . __('View posts') . "'>$numposts</a>";
|
if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_object->ID' title='" . __('View posts') . "'>$numposts</a>";
|
||||||
echo "
|
echo "
|
||||||
<tr $style>
|
<tr $style>
|
||||||
<td><input type='checkbox' name='users[]' id='user_{$user_data->ID}' value='{$user_data->ID}' /> <label for='user_{$user_data->ID}'>{$user_data->ID}</label></td>
|
<td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' value='{$user_object->ID}' /> <label for='user_{$user_object->ID}'>{$user_object->ID}</label></td>
|
||||||
<td><label for='user_{$user_data->ID}'><strong>$user_data->user_login</strong></label></td>
|
<td><label for='user_{$user_object->ID}'><strong>$user_object->user_login</strong></label></td>
|
||||||
<td><label for='user_{$user_data->ID}'>$user_data->first_name $user_data->last_name</label></td>
|
<td><label for='user_{$user_object->ID}'>$user_object->first_name $user_object->last_name</label></td>
|
||||||
<td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
|
<td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td>
|
||||||
<td><a href='$url' title='website: $url'>$short_url</a></td>";
|
<td><a href='$url' title='website: $url'>$short_url</a></td>";
|
||||||
echo "<td align='right'>$numposts</td>";
|
echo "<td align='right'>$numposts</td>";
|
||||||
echo '<td>';
|
echo '<td>';
|
||||||
if (current_user_can('edit_users'))
|
if (current_user_can('edit_users'))
|
||||||
echo "<a href='user-edit.php?user_id=$user_data->ID' class='edit'>".__('Edit')."</a>";
|
echo "<a href='user-edit.php?user_id=$user_object->ID' class='edit'>".__('Edit')."</a>";
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
|
@ -123,9 +123,13 @@ class WP_User {
|
|||||||
if ( empty($this->data->ID) )
|
if ( empty($this->data->ID) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$this->id = $this->data->ID;
|
foreach (get_object_vars($this->data) as $key => $value) {
|
||||||
|
$this->{$key} = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->id = $this->ID;
|
||||||
$this->cap_key = $table_prefix . 'capabilities';
|
$this->cap_key = $table_prefix . 'capabilities';
|
||||||
$this->caps = &$this->data->{$this->cap_key};
|
$this->caps = &$this->{$this->cap_key};
|
||||||
if ( ! is_array($this->caps) )
|
if ( ! is_array($this->caps) )
|
||||||
$this->caps = array();
|
$this->caps = array();
|
||||||
$this->get_role_caps();
|
$this->get_role_caps();
|
||||||
@ -182,8 +186,8 @@ class WP_User {
|
|||||||
|
|
||||||
function update_user_level_from_caps() {
|
function update_user_level_from_caps() {
|
||||||
global $table_prefix;
|
global $table_prefix;
|
||||||
$this->data->user_level = array_reduce(array_keys($this->allcaps), array(&$this, 'level_reduction'), 0);
|
$this->user_level = array_reduce(array_keys($this->allcaps), array(&$this, 'level_reduction'), 0);
|
||||||
update_usermeta($this->id, $table_prefix.'user_level', $this->data->user_level);
|
update_usermeta($this->id, $table_prefix.'user_level', $this->user_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_cap($cap, $grant = true) {
|
function add_cap($cap, $grant = true) {
|
||||||
|
@ -299,10 +299,10 @@ function get_option($option) {
|
|||||||
|
|
||||||
function get_user_option( $option ) {
|
function get_user_option( $option ) {
|
||||||
global $wpdb, $current_user;
|
global $wpdb, $current_user;
|
||||||
if ( isset( $current_user->data->{$wpdb->prefix . $option} ) ) // Blog specific
|
if ( isset( $current_user->{$wpdb->prefix . $option} ) ) // Blog specific
|
||||||
return $current_user->data->{$wpdb->prefix . $option};
|
return $current_user->{$wpdb->prefix . $option};
|
||||||
elseif ( isset( $current_user->data->{$option} ) ) // User specific and cross-blog
|
elseif ( isset( $current_user->{$option} ) ) // User specific and cross-blog
|
||||||
return $current_user->data->{$option};
|
return $current_user->{$option};
|
||||||
else // Blog global
|
else // Blog global
|
||||||
return get_option( $option );
|
return get_option( $option );
|
||||||
}
|
}
|
||||||
|
@ -365,8 +365,8 @@ function wp_new_user_notification($user_id, $plaintext_pass = '') {
|
|||||||
for ($i = 0; $i < strlen($pass1); $i = $i + 1)
|
for ($i = 0; $i < strlen($pass1); $i = $i + 1)
|
||||||
$stars .= '*';
|
$stars .= '*';
|
||||||
|
|
||||||
$user_login = stripslashes($user->data->user_login);
|
$user_login = stripslashes($user->user_login);
|
||||||
$user_email = stripslashes($user->data->user_email);
|
$user_email = stripslashes($user->user_email);
|
||||||
|
|
||||||
$message = sprintf(__('New user registration on your blog %s:'), get_settings('blogname')) . "\r\n\r\n";
|
$message = sprintf(__('New user registration on your blog %s:'), get_settings('blogname')) . "\r\n\r\n";
|
||||||
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user