Last active
December 17, 2015 03:38
-
-
Save chicks/5544412 to your computer and use it in GitHub Desktop.
Limit which subpanels are displayed by a custom field on User
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Put this in: custom/modules/Accounts/Layoutdefs/layoutdefs.ext.php | |
global $current_user; | |
$edition = $current_user->edition_c; | |
if ( $edition == "Basic" ) { | |
unset($layout_defs['Accounts']['subpanel_setup']['documents']); | |
unset($layout_defs['Accounts']['subpanel_setup']['quotes']); | |
} | |
if ( $edition == "Standard" ) { | |
unset($layout_defs['Accounts']['subpanel_setup']['quotes']); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Put this in: custom/modules/Users/Ext/Vardefs/vardefs.ext.php | |
$dictionary['User']['fields']['edition_c']['enforced']=''; | |
$dictionary['User']['fields']['edition_c']['dependency']=''; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment