Fix admin access in profiles

This commit is contained in:
champsupertramp
2016-03-02 19:03:39 +08:00
parent 980e3441f0
commit a5aa428ede
+4 -2
View File
@@ -27,7 +27,9 @@
$actions = null;
if ( !um_user('super_admin') ) {
um_fetch_user( um_profile_id() );
if ( current_user_can('manage_options') ) {
if ( um_user('account_status') == 'awaiting_admin_review' ){
$actions['um_approve_membership'] = array( 'label' => __('Approve Membership','ultimatemember') );
@@ -64,7 +66,7 @@
$actions['um_switch_user'] = array( 'label' => __('Login as this user','ultimatemember') );
}
um_fetch_user( um_profile_id() );
return $actions;
}