summaryrefslogtreecommitdiffstats
path: root/wp-includes
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-29 12:22:20 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-29 12:22:20 +0000
commit94a82dbfcd3f918bb53d664f05ba6458f3e235c2 (patch)
treefcfabb692f877e5d3ea2b747a3acb3bcc4bb9c87 /wp-includes
parentf8826b51365ab156a88f1751ade2f8ce2e75e67b (diff)
downloadwordpress-mu-94a82dbfcd3f918bb53d664f05ba6458f3e235c2.tar.gz
wordpress-mu-94a82dbfcd3f918bb53d664f05ba6458f3e235c2.tar.xz
wordpress-mu-94a82dbfcd3f918bb53d664f05ba6458f3e235c2.zip
Update site option if it's already there in add_site_option
delete user cache when they're added to a blog git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@953 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes')
-rw-r--r--wp-includes/wpmu-functions.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index 538d0f4..bf13d16 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -254,8 +254,10 @@ function add_site_option( $key, $value ) {
$exists = $wpdb->get_var("SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = '$key' AND site_id = '{$wpdb->siteid}'");
- if ( null !== $exists ) // If we already have it
+ if ( null !== $exists ) {// If we already have it
+ update_site_option( $key, $value );
return false;
+ }
if ( is_array($value) || is_object($value) )
$value = serialize($value);
@@ -660,6 +662,8 @@ function add_user_to_blog( $blog_id, $user_id, $role ) {
do_action('add_user_to_blog', $user_id, $role, $blog_id);
+ wp_cache_delete( $user_id, 'users' );
+
restore_current_blog();
}