From ea496625f87d630a47b908ca8a85f1a5cf784e5f Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Tue, 27 Apr 2021 00:21:32 +0300 Subject: [PATCH] Added: Hook to unlock the ability to add new users through the registration form --- includes/core/class-shortcodes.php | 5 ++++- readme.txt | 8 ++++++++ ultimate-member.php | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/includes/core/class-shortcodes.php b/includes/core/class-shortcodes.php index c9fcd0fe..ae31c36e 100644 --- a/includes/core/class-shortcodes.php +++ b/includes/core/class-shortcodes.php @@ -677,7 +677,10 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) { //not display on admin preview if ( empty( $_POST['act_id'] ) || $_POST['act_id'] != 'um_admin_preview_form' ) { - if ( 'register' == $mode && is_user_logged_in() ) { + + $enable_loggedin_registration = apply_filters( 'um_registration_for_loggedin_users', false, $args ); + + if ( 'register' == $mode && is_user_logged_in() && ! $enable_loggedin_registration ) { ob_get_clean(); return __( 'You are already registered', 'ultimate-member' ); } diff --git a/readme.txt b/readme.txt index a11c06e9..7331772c 100644 --- a/readme.txt +++ b/readme.txt @@ -155,6 +155,14 @@ The plugin works with popular caching plugins by automatically excluding Ultimat * To learn more about version 2.1 please see this [docs](https://docs.ultimatemember.com/article/1512-upgrade-2-1-0) * UM2.1+ is a significant update to the Member Directories' code base from 2.0.x. Please make sure you take a full-site backup with restore point before updating the plugin += 2.1.20: May xx, 2021 = + +* Enhancements: + - Added: Hook to unlock the ability to add new users through the registration form + +* Bugfixes: + - Fixed: Temp directory size calculation + = 2.1.19: April 20, 2021 = * Bugfixes: diff --git a/ultimate-member.php b/ultimate-member.php index 29090d64..c33138f7 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -3,7 +3,7 @@ Plugin Name: Ultimate Member Plugin URI: http://ultimatemember.com/ Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress -Version: 2.1.19 +Version: 2.1.20-alpha Author: Ultimate Member Author URI: http://ultimatemember.com/ Text Domain: ultimate-member