mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed default values on Add User Role;
- fixed some PHP notices;
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Force hiding adminbar in frontend?', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Show/hide the adminbar on frontend', 'ultimate-member' ),
|
||||
'value' => ! empty( $role['_um_can_not_see_adminbar'] ) ? $role['_um_can_not_see_adminbar'] : 0,
|
||||
'value' => ! empty( $role['_um_can_not_see_adminbar'] ) ? $role['_um_can_not_see_adminbar'] : 1,
|
||||
),
|
||||
array(
|
||||
'id' => '_um_can_edit_everyone',
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Can view default homepage?', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Allow this user role to view your site\'s homepage', 'ultimate-member' ),
|
||||
'value' => ! empty( $role['_um_default_homepage'] ) ? $role['_um_default_homepage'] : 0,
|
||||
'value' => ! empty( $role['_um_default_homepage'] ) ? $role['_um_default_homepage'] : 1,
|
||||
),
|
||||
array(
|
||||
'id' => '_um_redirect_homepage',
|
||||
|
||||
@@ -189,7 +189,8 @@ if ( ! class_exists( 'Access' ) ) {
|
||||
if ( is_front_page() ) {
|
||||
if ( is_user_logged_in() ) {
|
||||
|
||||
if ( ! empty( um_user( 'default_homepage' ) ) )
|
||||
$user_default_homepage = um_user( 'default_homepage' );
|
||||
if ( ! empty( $user_default_homepage ) )
|
||||
return;
|
||||
|
||||
$redirect_homepage = um_user( 'redirect_homepage' );
|
||||
|
||||
@@ -14,7 +14,8 @@ function um_access_profile( $user_id ) {
|
||||
|
||||
um_fetch_user( $user_id );
|
||||
|
||||
if ( ! in_array( um_user( 'account_status' ), array( 'approved' ) ) ) {
|
||||
$account_status = um_user( 'account_status' );
|
||||
if ( ! in_array( $account_status, array( 'approved' ) ) ) {
|
||||
um_redirect_home();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user