- fixed default values on Add User Role;

- fixed some PHP notices;
This commit is contained in:
nikitozzzzzzz
2018-02-20 17:19:30 +02:00
parent 1b03923c6b
commit 7bd09d77c4
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -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',
+1 -1
View File
@@ -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',
+2 -1
View File
@@ -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' );
+2 -1
View File
@@ -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();
}