mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
Added support for a different unique field of Member to be used in developer config
This commit is contained in:
parent
a050d926de
commit
59ca054ba6
@ -54,7 +54,8 @@ class BetterNavigator extends DataExtension {
|
||||
// Is the logged in member nominated as a developer?
|
||||
$member = Member::currentUser();
|
||||
$devs = Config::inst()->get('BetterNavigator', 'developers');
|
||||
$isDeveloper = $member && is_array($devs) ? in_array($member->Email, $devs) : false;
|
||||
$identifierField = Member::config()->unique_identifier_field;
|
||||
$isDeveloper = $member && is_array($devs) ? in_array($member->{$identifierField}, $devs) : false;
|
||||
|
||||
// Add other data for template
|
||||
$backURL = '?BackURL=' . urlencode($this->owner->Link());
|
||||
|
Loading…
Reference in New Issue
Block a user