* that structure here.
*
*/
+$lockedToMember = apply_filters('glm_members_locked_to_member_id', false);
+$enable_contact_edit_only = $this->config['settings']['enable_contact_edit_only'];
-add_submenu_page(
- $mainMenuSlug,
- 'Contacts',
- 'Contacts',
- 'glm_members_edit_my_entity',
- 'glm-members-admin-menu-contacts',
- function() {$this->controller('contacts');}
-);
+if ( $lockedToMember && $enable_contact_edit_only ) {
-// If a contact is logged in (ownEntity isn't false), add Contact Profile menu item
-// they see the "My Contact"
-if ($this->config['loggedInUser']['contactUser']) {
add_submenu_page(
$mainMenuSlug,
'My Contact Info',
- ' My Contact Info',
+ 'My Contact Info',
'glm_members_edit_my_contact_info',
'glm-members-admin-menu-profile',
function() {$this->controller('profile');}
);
+
+} else {
+
+ add_submenu_page(
+ $mainMenuSlug,
+ 'Contacts',
+ 'Contacts',
+ 'glm_members_edit_my_entity',
+ 'glm-members-admin-menu-contacts',
+ function() {$this->controller('contacts');}
+ );
+
+ // If a contact is logged in (ownEntity isn't false), add Contact Profile menu item
+ // they see the "My Contact"
+ if ($this->config['loggedInUser']['contactUser']) {
+ add_submenu_page(
+ $mainMenuSlug,
+ 'My Contact Info',
+ ' My Contact Info',
+ 'glm_members_edit_my_contact_info',
+ 'glm-members-admin-menu-profile',
+ function() {$this->controller('profile');}
+ );
+ }
}