diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-01-09 12:43:55 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-01-09 12:43:55 +0000 |
commit | bf4750fd9691a0ee03b00371d0fa29bc1ae56549 (patch) | |
tree | cf053b21d502842fe5698b35ca01455f7d963b96 /wp-admin | |
parent | 819f131230b6d2e4ff88a8773eef754228989ffc (diff) | |
download | wordpress-mu-bf4750fd9691a0ee03b00371d0fa29bc1ae56549.tar.gz wordpress-mu-bf4750fd9691a0ee03b00371d0fa29bc1ae56549.tar.xz wordpress-mu-bf4750fd9691a0ee03b00371d0fa29bc1ae56549.zip |
Save new admin email with hash in db. (fixes #204)
Better option update message
Sanitize options
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@836 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin')
-rw-r--r-- | wp-admin/admin-functions.php | 1 | ||||
-rw-r--r-- | wp-admin/options.php | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 94f6cc8..6e0d177 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -2257,6 +2257,7 @@ function update_option_new_admin_email($old_value, $value) { "hash" => $hash, "newemail" => $value ); + update_option( 'adminhash', $newadminemail ); // TODO: gettext wp_mail( $value, "[ " . get_option( 'blogname' ) . " ] New Admin Email Address", "Dear User, diff --git a/wp-admin/options.php b/wp-admin/options.php index 63486d5..f502a7d 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -16,9 +16,12 @@ if( $_GET[ 'adminhash' ] ) { update_option( "admin_email", $new_admin_details[ 'newemail' ] ); delete_option( "adminhash" ); delete_option( "new_admin_email" ); + wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=true" ); + exit; + } else { + wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=false" ); + exit; } - wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=true" ); - exit; } function sanitize_option($option, $value) { // Remember to call stripslashes! @@ -58,6 +61,7 @@ function sanitize_option($option, $value) { // Remember to call stripslashes! if (current_user_can('unfiltered_html') == false) $value = wp_filter_post_kses( $value ); // calls stripslashes then addslashes $value = stripslashes($value); + $value = wp_specialchars( $value ); break; case 'blog_charset': |