diff --git a/composer.json b/composer.json index 15ca152..020323a 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "User Access Manager plugin for Wordpress", "type": "wordpress-plugin", "license": "GPL-2.0", - "version": "2.2.19", + "version": "2.2.20", "authors": [ { "name": "Alexander Schneider", diff --git a/package.json b/package.json index da9051a..112aa8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "user-access-manager", - "version": "2.2.19", + "version": "2.2.20", "description": "[![Build Status](https://travis-ci.org/GM-Alex/user-access-manager.svg)](https://travis-ci.org/GM-Alex/user-access-manager)", "main": "index.js", "directories": { diff --git a/readme.txt b/readme.txt index a4294d8..07264f4 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i Tags: admin, access, member area, members, member, member access, page, pages, post, posts, private, privacy, restrict, user, user access manager, user management Requires at least: 4.7 Tested up to: 6.1 -Stable tag: 2.2.19 +Stable tag: 2.2.20 With the "User Access Manager"-plugin you can manage the access to your posts, pages and files. @@ -63,6 +63,8 @@ Here you found the changes in each version. Version Date Changes + 2.2.20 2023/03/08 Fix warning + 2.2.19 2022/11/18 Add try out link 2.2.18 2022/11/14 Fix issue with label id. Thanks to elbakkali diff --git a/src/UserAccessManager.php b/src/UserAccessManager.php index 87e3835..18e8765 100644 --- a/src/UserAccessManager.php +++ b/src/UserAccessManager.php @@ -50,7 +50,7 @@ */ class UserAccessManager { - const VERSION = '2.2.19'; + const VERSION = '2.2.20'; const DB_VERSION = '1.6.1'; /** diff --git a/src/UserGroup/DynamicUserGroup.php b/src/UserGroup/DynamicUserGroup.php index 3fb79b3..464c2b6 100644 --- a/src/UserGroup/DynamicUserGroup.php +++ b/src/UserGroup/DynamicUserGroup.php @@ -105,7 +105,8 @@ public function getName(): string $this->name = TXT_UAM_ADD_DYNAMIC_NOT_LOGGED_IN_USERS; } elseif ($this->type === self::USER_TYPE) { $userData = $this->wordpress->getUserData($this->id); - $this->name = TXT_UAM_USER . ": {$userData->display_name} ($userData->user_login)"; + $userName = $userData !== false ? "$userData->display_name ($userData->user_login)" : ''; + $this->name = TXT_UAM_USER . ": $userName"; } elseif ($this->type === self::ROLE_TYPE) { $roles = $this->wordpress->getRoles()->roles; $this->name = TXT_UAM_ROLE . ': '; diff --git a/user-access-manager.php b/user-access-manager.php index fbeae10..62c53ec 100644 --- a/user-access-manager.php +++ b/user-access-manager.php @@ -3,7 +3,7 @@ * Plugin Name: User Access Manager * Plugin URI: https://wordpress.org/plugins/user-access-manager/ * Author URI: https://twitter.com/GM_Alex - * Version: 2.2.19 + * Version: 2.2.20 * Requires PHP: 7.2 * Author: Alexander Schneider * Description: Manage the access to your posts, pages, categories and files.