*/
private function add_more_attributes(&$attributes, $username) {
+ //
+ // query on staff
+ //
+
+ $staff_data = $this->query_db('query_staff', ['username' => $username, 'fsf_org_id' => $this->fsf_org_id]);
+
+ if (count($staff_data) === 0) {
+ // No rows returned - invalid username
+ Logger::debug('fsfdrupalauth:'.$this->authId.
+ ': No rows in result set. Probably not FSF staff.');
+ }
+
+ $attributes['is_fsf_staff'] = ['false'];
+
+ foreach ($staff_data as $row) {
+ foreach ($row as $key => $value) {
+
+ if ($value === null) {
+ continue;
+ }
+ $value = (string) $value;
+
+ if (strtolower($value) === strtolower($username)) {
+ // they are staff
+ $attributes['is_fsf_staff'] = ['true'];
+ break;
+ }
+ }
+ }
+
//
// query on membership
//
} elseif ($compare_res($donation_query('query_discussion_process_adhoc', $adhoc_params), 1)) {
$attributes['discussion_process'] = ['true'];
+ } elseif ($attributes['is_fsf_staff'] == ['true']) {
+ $attributes['discussion_process'] = ['true'];
+
} elseif ($attributes['is_member'] != ['true']) {
Logger::debug('fsfdrupalauth:'.$this->authId.
': Not eligible for board nominee discussion process.');
$attributes['discussion_process'] = ['false'];
}
- //
- // query on staff
- //
-
- $staff_data = $this->query_db('query_staff', ['username' => $username, 'fsf_org_id' => $this->fsf_org_id]);
-
- if (count($staff_data) === 0) {
- // No rows returned - invalid username
- Logger::debug('fsfdrupalauth:'.$this->authId.
- ': No rows in result set. Probably not FSF staff.');
- }
-
- $attributes['is_fsf_staff'] = ['false'];
-
- foreach ($staff_data as $row) {
- foreach ($row as $key => $value) {
-
- if ($value === null) {
- continue;
- }
- $value = (string) $value;
-
- if (strtolower($value) === strtolower($username)) {
- // they are staff
- $attributes['is_fsf_staff'] = ['true'];
- break;
- }
- }
- }
-
//
// aggregate attribute
//