diff --git a/code/BetterNavigator.php b/code/BetterNavigator.php index 0904709..1d38c88 100755 --- a/code/BetterNavigator.php +++ b/code/BetterNavigator.php @@ -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());