Pass user to actions. Props sirzooro. fixes #9795

git-svn-id: http://svn.automattic.com/wordpress/trunk@11302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-05-12 16:54:18 +00:00
parent f5a6197172
commit def8fb6cd2

View File

@ -142,9 +142,9 @@ if ( !current_user_can('edit_user', $user_id) )
wp_die(__('You do not have permission to edit this user.')); wp_die(__('You do not have permission to edit this user.'));
if ($is_profile_page) if ($is_profile_page)
do_action('personal_options_update'); do_action('personal_options_update', $user_id);
else else
do_action('edit_user_profile_update'); do_action('edit_user_profile_update', $user_id);
$errors = edit_user($user_id); $errors = edit_user($user_id);
@ -350,7 +350,7 @@ else
</tr> </tr>
<?php <?php
$show_password_fields = apply_filters('show_password_fields', true); $show_password_fields = apply_filters('show_password_fields', true, $profileuser);
if ( $show_password_fields ) : if ( $show_password_fields ) :
?> ?>
<tr id="password"> <tr id="password">
@ -368,13 +368,13 @@ if ( $show_password_fields ) :
<?php <?php
if ( $is_profile_page ) { if ( $is_profile_page ) {
do_action('show_user_profile'); do_action('show_user_profile', $profileuser);
} else { } else {
do_action('edit_user_profile'); do_action('edit_user_profile', $profileuser);
} }
?> ?>
<?php if (count($profileuser->caps) > count($profileuser->roles) && apply_filters('additional_capabilities_display', true)): ?> <?php if (count($profileuser->caps) > count($profileuser->roles) && apply_filters('additional_capabilities_display', true, $profileuser)): ?>
<br class="clear" /> <br class="clear" />
<table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform"> <table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform">
<tr> <tr>