Index: wp-includes/registration.php
===================================================================
--- wp-includes/registration.php	(Revision 13972)
+++ wp-includes/registration.php	(Arbeitskopie)
@@ -323,6 +323,8 @@
  */
 function _wp_get_user_contactmethods() {
 	$user_contactmethods = array(
+		'user_email' => __('E-Mail'),
+		'user_url' => __('Website'),
 		'aim' => __('AIM'),
 		'yim' => __('Yahoo IM'),
 		'jabber' => __('Jabber / Google Talk')
@@ -330,4 +332,60 @@
 	return apply_filters('user_contactmethods',$user_contactmethods);
 }
 
+/**
+ * Setup the default name fields
+ *
+ * @access private
+ * @since
+ *
+ * @return array $user_namefields Array of contact methods and their labels.
+ */
+function _wp_get_user_namefields() {
+	$user_namefields = array(
+		'user_login' => __('Username'),
+		'first_name' => __('First Name'),
+		'last_name' => __('Last Name'),
+		'nickname' => __('Nickname'),
+	);
+	return apply_filters('user_namefields',$user_namefields);
+}
+
+/**
+ * Setup the default personal options
+ *
+ * @access private
+ * @since
+ *
+ * @return array $user_personal_options Array of personal options and their input code
+ */
+function _wp_get_user_personal_options($user_can_edit) {
+	global $user_id;
+	$profileuser = get_user_to_edit($user_id);
+	if ( rich_edit_exists() && !( IS_PROFILE_PAGE && !$user_can_edit ) ) { // don't bother showing the option if the editor has been removed
+		$user_personal_options['rich_editing'] = array(
+				'name' => 'rich_editing',
+				'desc' => __('Visual Editor'),
+				'code' => '<label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" '.checked('false', $profileuser->rich_editing, false).' /> '. __('Disable the visual editor when writing').'</label>'
+				);
+	};
+	global $_wp_admin_css_colors;
+	if ( count($_wp_admin_css_colors) > 1 && has_action('admin_color_scheme_picker') ) {
+		$user_personal_options['admin_color_scheme_picker'] = array(
+				'name' => 'admin_color_scheme_picker',
+				'desc' => __('Admin Color Scheme'),
+				'code' => 'admin_color_scheme_picker',
+				'scope' => ' scope="row"'
+		);
+	};
+	if ( !( IS_PROFILE_PAGE && !$user_can_edit ) ) {	
+		if ( !empty($profileuser->comment_shortcuts) ) $checked = checked('true', $profileuser->comment_shortcuts, false);
+		$user_personal_options['comment_shortcuts'] = array(
+				'name' => 'rich_editing',
+				'desc' => __('Keyboard Shortcuts'),
+				'code' => '<label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" '.$checked.' /> '. __('Enable keyboard shortcuts for comment moderation.').'</label> '. __('<a href="http://codex.wordpress.org/Keyboard_Shortcuts">More information</a>')
+		);
+	};	
+	return apply_filters('user_personal_options', $user_personal_options);
+}
+
 ?>
Index: wp-admin/user-edit.php
===================================================================
--- wp-admin/user-edit.php	(Revision 13972)
+++ wp-admin/user-edit.php	(Arbeitskopie)
@@ -177,86 +177,67 @@
 <input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" />
 </p>
 
-<h3><?php _e('Personal Options'); ?></h3>
+<?php 
 
+$user_personal_options = _wp_get_user_personal_options($user_can_edit);
+
+if (!empty($user_personal_options)) { ?>
+
+<div id="profile-personal-options">
+
+<h3 id="profile-personal-options-title"><?php _e('Personal Options'); ?></h3>
+
 <table class="form-table">
-<?php if ( rich_edit_exists() && !( IS_PROFILE_PAGE && !$user_can_edit ) ) : // don't bother showing the option if the editor has been removed ?>
-	<tr>
-		<th scope="row"><?php _e('Visual Editor')?></th>
-		<td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php checked('false', $profileuser->rich_editing); ?> /> <?php _e('Disable the visual editor when writing'); ?></label></td>
-	</tr>
-<?php endif; ?>
-<?php if ( count($_wp_admin_css_colors) > 1 && has_action('admin_color_scheme_picker') ) : ?>
-<tr>
-<th scope="row"><?php _e('Admin Color Scheme')?></th>
-<td><?php do_action( 'admin_color_scheme_picker' ); ?></td>
+
+<?php 
+	foreach ($user_personal_options as $code) {
+?>
+<tr id="profile-personal-options-<?php echo $code['name']; ?>">
+	<th<?php echo $code['scope']; ?>><label for="<?php echo $code['name']; ?>"><?php echo apply_filters('user_'.$code['name'].'_label', $code['desc']); ?></label></th>
+	<td><?php if ($code['code']=='admin_color_scheme_picker') do_action( 'admin_color_scheme_picker' ); else echo $code['code']; ?></td>
 </tr>
 <?php
-endif; // $_wp_admin_css_colors
-if ( !( IS_PROFILE_PAGE && !$user_can_edit ) ) : ?>
-<tr>
-<th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th>
-<td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php if ( !empty($profileuser->comment_shortcuts) ) checked('true', $profileuser->comment_shortcuts); ?> /> <?php _e('Enable keyboard shortcuts for comment moderation.'); ?></label> <?php _e('<a href="http://codex.wordpress.org/Keyboard_Shortcuts">More information</a>'); ?></td>
-</tr>
-<?php
-endif;
-do_action('personal_options', $profileuser);
+	}
+
+	do_action('personal_options', $profileuser);
 ?>
 </table>
 <?php
 	if ( IS_PROFILE_PAGE )
 		do_action('profile_personal_options', $profileuser);
 ?>
+</div>
 
-<h3><?php _e('Name') ?></h3>
-
-<table class="form-table">
-	<tr>
-		<th><label for="user_login"><?php _e('Username'); ?></label></th>
-		<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr($profileuser->user_login); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e('Usernames cannot be changed.'); ?></span></td>
-	</tr>
-
-<?php if ( !IS_PROFILE_PAGE ): ?>
-<tr><th><label for="role"><?php _e('Role:') ?></label></th>
-<td><select name="role" id="role">
 <?php
-// Get the highest/primary role for this user
-// TODO: create a function that does this: wp_get_user_role()
-$user_roles = $profileuser->roles;
-$user_role = array_shift($user_roles);
+}
 
-// print the full list of roles with the primary one selected.
-wp_dropdown_roles($user_role);
+// For backwards compatibility 
+function user_label_add_required($desc){ 
+        return  $desc.' <span class="description">'. __('(required)').'</span>'; 
+} 
+add_filter('user_user_email_label','user_label_add_required'); 
+add_filter('user_nickname_label','user_label_add_required'); 
+$user_namefields = _wp_get_user_namefields(); 
 
-// print the 'no role' option. Make it selected if the user has no role yet.
-if ( $user_role )
-	echo '<option value="">' . __('&mdash; No role for this blog &mdash;') . '</option>';
-else
-	echo '<option value="" selected="selected">' . __('&mdash; No role for this blog &mdash;') . '</option>';
-?>
-</select>
-<?php if ( is_multisite() && is_super_admin() ) { ?>
-<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.'); ?></label></p>
-<?php } ?>
-</td></tr>
-<?php endif; //!IS_PROFILE_PAGE ?>
+if (!empty($user_namefields)) { ?> 
 
-<tr>
-	<th><label for="first_name"><?php _e('First Name') ?></label></th>
-	<td><input type="text" name="first_name" id="first_name" value="<?php echo esc_attr($profileuser->first_name) ?>" class="regular-text" /></td>
-</tr>
+<div id="profile-name"> 
+<h3 id="profile-name-title"><?php _e('Name') ?></h3> 
+ 
+<table class="form-table" > 
+ 
+<?php  
+        foreach ($user_namefields as $name => $desc) { 
+?> 
+<tr id="profile-name-<?php echo $name; ?>"> 
+        <th><label for="<?php echo $name; ?>"><?php echo apply_filters('user_'.$name.'_label', $desc); ?></label></th> 
+        <td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr($profileuser->$name) ?>" class="regular-text" /></td> 
+</tr> 
+<?php 
+        } 
+?>         
 
-<tr>
-	<th><label for="last_name"><?php _e('Last Name') ?></label></th>
-	<td><input type="text" name="last_name" id="last_name" value="<?php echo esc_attr($profileuser->last_name) ?>" class="regular-text" /></td>
-</tr>
-
-<tr>
-	<th><label for="nickname"><?php _e('Nickname'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
-	<td><input type="text" name="nickname" id="nickname" value="<?php echo esc_attr($profileuser->nickname) ?>" class="regular-text" /></td>
-</tr>
-
-<tr>
+<tr id="profile-name-display-name"> 
 	<th><label for="display_name"><?php _e('Display name publicly as') ?></label></th>
 	<td>
 		<select name="display_name" id="display_name">
@@ -285,25 +266,53 @@
 		</select>
 	</td>
 </tr>
+
+<?php if ( !IS_PROFILE_PAGE ): ?>
+<tr id="profile-name-role"><th><label for="role"><?php _e('Role:') ?></label></th>
+<td><select name="role" id="role">
+<?php
+// Get the highest/primary role for this user
+// TODO: create a function that does this: wp_get_user_role()
+$user_roles = $profileuser->roles;
+$user_role = array_shift($user_roles);
+
+// print the full list of roles with the primary one selected.
+wp_dropdown_roles($user_role);
+
+// print the 'no role' option. Make it selected if the user has no role yet.
+if ( $user_role )
+	echo '<option value="">' . __('&mdash; No role for this blog &mdash;') . '</option>';
+else
+	echo '<option value="" selected="selected">' . __('&mdash; No role for this blog &mdash;') . '</option>';
+?>
+</select><?php if ( is_multisite() && is_super_admin() ) { ?>
+<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.'); ?></label></p>
+<?php } ?>
+</td></tr>
+<?php endif; //!IS_PROFILE_PAGE ?>
+
 </table>
 
-<h3><?php _e('Contact Info') ?></h3>
+</div>
 
-<table class="form-table">
-<tr>
-	<th><label for="email"><?php _e('E-mail'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
-	<td><input type="text" name="email" id="email" value="<?php echo esc_attr($profileuser->user_email) ?>" class="regular-text" /></td>
-</tr>
+<?php
+}
 
-<tr>
-	<th><label for="url"><?php _e('Website') ?></label></th>
-	<td><input type="text" name="url" id="url" value="<?php echo esc_attr($profileuser->user_url) ?>" class="regular-text code" /></td>
-</tr>
+$user_contactmethods = _wp_get_user_contactmethods();
 
-<?php
-	foreach (_wp_get_user_contactmethods() as $name => $desc) {
+if (!empty($user_contactmethods)) {
 ?>
-<tr>
+
+<div id="profile-contact-info">
+
+<h3 id="profile-contact-info-title"><?php _e('Contact Info') ?></h3>
+
+<table class="form-table">
+
+<?php 
+	foreach ($user_contactmethods as $name => $desc) {
+?>
+<tr id="profile-contact-info-<?php echo $name; ?>">
 	<th><label for="<?php echo $name; ?>"><?php echo apply_filters('user_'.$name.'_label', $desc); ?></label></th>
 	<td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr($profileuser->$name) ?>" class="regular-text" /></td>
 </tr>
@@ -312,10 +321,17 @@
 ?>
 </table>
 
-<h3><?php IS_PROFILE_PAGE ? _e('About Yourself') : _e('About the user'); ?></h3>
+</div>
+<?php
+}
+?>
 
+<div id="profile-about-yourself">
+
+<h3 id="profile-about-yourself-title"><?php IS_PROFILE_PAGE ? _e('About Yourself') : _e('About the user'); ?></h3>
+
 <table class="form-table">
-<tr>
+<tr id="profile-about-yourself-description">
 	<th><label for="description"><?php _e('Biographical Info'); ?></label></th>
 	<td><textarea name="description" id="description" rows="5" cols="30"><?php echo esc_html($profileuser->description); ?></textarea><br />
 	<span class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></span></td>
@@ -336,6 +352,8 @@
 <?php endif; ?>
 </table>
 
+</div>
+
 <?php
 	if ( IS_PROFILE_PAGE )
 		do_action( 'show_user_profile', $profileuser );
@@ -344,6 +362,8 @@
 ?>
 
 <?php if ( count($profileuser->caps) > count($profileuser->roles) && apply_filters('additional_capabilities_display', true, $profileuser) ) { ?>
+<div id="profile-caps">
+
 <br class="clear" />
 	<table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform">
 		<tr>
@@ -361,6 +381,7 @@
 			?></td>
 		</tr>
 	</table>
+</div>
 <?php } ?>
 
 <p class="submit">
