From 98ce5bc2efef255cb280531b6b78574d5a14c6d5 Mon Sep 17 00:00:00 2001 From: ultimatemember Date: Sun, 8 Feb 2015 13:38:41 +0200 Subject: [PATCH] Version 1.0.45 --- core/um-user.php | 16 +++++++++++++--- index.php | 2 +- readme.txt | 6 +++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/core/um-user.php b/core/um-user.php index 097c5eac..c66ece33 100644 --- a/core/um-user.php +++ b/core/um-user.php @@ -319,13 +319,23 @@ class UM_User { } $ultimatemember->files->remove_dir( um_user_uploads_dir() ); - - require_once( ABSPATH . 'wp-admin/includes/user.php' ); - + if ( is_multisite() ) { + + if ( !function_exists('wpmu_delete_user') ) { + require_once( ABSPATH . 'wp-admin/includes/ms.php' ); + } + wpmu_delete_user( $this->id ); + } else { + + if ( !function_exists('wp_delete_user') ) { + require_once( ABSPATH . 'wp-admin/includes/user.php' ); + } + wp_delete_user( $this->id ); + } } diff --git a/index.php b/index.php index 4b9b8191..29d81baa 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ Plugin Name: Ultimate Member Plugin URI: http://ultimatemember.com/ Description: Ultimate Member is a powerful community and membership plugin that allows you to create beautiful community and membership sites with WordPress -Version: 1.0.44 +Version: 1.0.45 Author: Ultimate Member Author URI: http://ultimatemember.com/ */ diff --git a/readme.txt b/readme.txt index 940e3f18..89175982 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm Requires at least: 4.1 Tested up to: 4.1 -Stable Tag: 1.0.44 +Stable Tag: 1.0.45 License: GNU Version 2 or Any Later Version @@ -185,6 +185,10 @@ The plugin works with popular caching plugins by automatically excluding Ultimat == Changelog == += 1.0.45: February 8, 2015 = + +* Fixed: Multisite bug php Fatal error: call to undefined function wpmu_delete_user() + = 1.0.44: February 8, 2015 = * Tweak: improved performance: unused user photos are deleted when user upload