mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed PHP notices when there aren't UM custom roles and we get bool variable from get_option( 'um_roles' );
This commit is contained in:
@@ -978,7 +978,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
if ( strstr( $key, 'role_' ) || $key == 'role' ) {
|
||||
$field_value = strtolower( UM()->roles()->get_editable_priority_user_role( um_user( 'ID' ) ) );
|
||||
|
||||
$role_keys = get_option( 'um_roles' );
|
||||
$role_keys = get_option( 'um_roles', array() );
|
||||
|
||||
if ( ! empty( $role_keys ) ) {
|
||||
if ( in_array( $field_value, $role_keys ) ) {
|
||||
@@ -1125,7 +1125,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
if ( strstr( $key, 'role_' ) || $key == 'role' ) {
|
||||
$um_user_value = strtolower( UM()->roles()->get_editable_priority_user_role( um_user( 'ID' ) ) );
|
||||
|
||||
$role_keys = get_option( 'um_roles' );
|
||||
$role_keys = get_option( 'um_roles', array() );
|
||||
|
||||
if ( ! empty( $role_keys ) ) {
|
||||
if ( in_array( $um_user_value, $role_keys ) ) {
|
||||
|
||||
Reference in New Issue
Block a user