mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
Merge pull request #22 from sb-relaxt-at/member-unique-identifier
Added support for a different unique field of Member in developer config
This commit is contained in:
commit
e0a82db467
@ -54,7 +54,8 @@ class BetterNavigator extends DataExtension {
|
|||||||
// Is the logged in member nominated as a developer?
|
// Is the logged in member nominated as a developer?
|
||||||
$member = Member::currentUser();
|
$member = Member::currentUser();
|
||||||
$devs = Config::inst()->get('BetterNavigator', 'developers');
|
$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
|
// Add other data for template
|
||||||
$backURL = '?BackURL=' . urlencode($this->owner->Link());
|
$backURL = '?BackURL=' . urlencode($this->owner->Link());
|
||||||
|
Loading…
Reference in New Issue
Block a user