@@ -199,20 +199,20 @@ |
||
199 | 199 | |
200 | 200 | //check if user authed based on standings |
201 | 201 | $standings = null; |
202 | - if ((string)$role === 'blue' || 'neut' || 'red') { |
|
202 | + if ((string) $role === 'blue' || 'neut' || 'red') { |
|
203 | 203 | $allianceContacts = getContacts($allianceID); |
204 | 204 | $corpContacts = getContacts($corporationID); |
205 | - if ((string)$role === 'blue' && ($allianceContacts['standings'] || $corpContacts['standings'] === 5 || 10)) { |
|
205 | + if ((string) $role === 'blue' && ($allianceContacts['standings'] || $corpContacts['standings'] === 5 || 10)) { |
|
206 | 206 | $standings = 1; |
207 | 207 | } |
208 | - if ((string)$role === 'red' && ($allianceContacts['standings'] || $corpContacts['standings'] === -5 || -10)) { |
|
208 | + if ((string) $role === 'red' && ($allianceContacts['standings'] || $corpContacts['standings'] === -5 || -10)) { |
|
209 | 209 | $standings = 1; |
210 | 210 | } |
211 | - if ((string)$role === 'neut' && ($allianceContacts['standings'] || $corpContacts['standings'] === 0 || (@(int)$allianceContacts['standings'] && @(int)$corpContacts['standings'] === null || ''))) { |
|
211 | + if ((string) $role === 'neut' && ($allianceContacts['standings'] || $corpContacts['standings'] === 0 || (@(int) $allianceContacts['standings'] && @(int) $corpContacts['standings'] === null || ''))) { |
|
212 | 212 | $standings = 1; |
213 | 213 | } |
214 | 214 | } |
215 | - if (!in_array((int)$allianceID, $allianceArray) && !in_array((int)$corporationID, $corpArray) && null === $standings) { |
|
215 | + if (!in_array((int) $allianceID, $allianceArray) && !in_array((int) $corporationID, $corpArray) && null === $standings) { |
|
216 | 216 | // Deactivate user in database |
217 | 217 | $sql = "UPDATE authUsers SET active='no' WHERE discordID='$discordID'"; |
218 | 218 | $this->logger->addInfo("AuthCheck: {$eveName} account has been deactivated as they are no longer in a correct corp/alliance."); |
@@ -196,27 +196,27 @@ |
||
196 | 196 | $allianceContacts = getContacts($allianceID); |
197 | 197 | $corpContacts = getContacts($corpID); |
198 | 198 | foreach ($roles as $role) { |
199 | - if ((@(int)$allianceContacts['standings'] === 5 || @(int)$corpContacts['standings'] === 5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus5Role']) { |
|
199 | + if ((@(int) $allianceContacts['standings'] === 5 || @(int) $corpContacts['standings'] === 5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus5Role']) { |
|
200 | 200 | $member->addRole($role); |
201 | 201 | $role = 'blue'; |
202 | 202 | break; |
203 | 203 | } |
204 | - if ((@(int)$allianceContacts['standings'] === 10 || @(int)$corpContacts['standings'] === 10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus10Role']) { |
|
204 | + if ((@(int) $allianceContacts['standings'] === 10 || @(int) $corpContacts['standings'] === 10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus10Role']) { |
|
205 | 205 | $member->addRole($role); |
206 | 206 | $role = 'blue'; |
207 | 207 | break; |
208 | 208 | } |
209 | - if ((@(int)$allianceContacts['standings'] === 0 || @(int)$corpContacts['standings'] === 0 || (@(int)$allianceContacts['standings'] && @(int)$corpContacts['standings'] === null || '')) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['neutralRole']) { |
|
209 | + if ((@(int) $allianceContacts['standings'] === 0 || @(int) $corpContacts['standings'] === 0 || (@(int) $allianceContacts['standings'] && @(int) $corpContacts['standings'] === null || '')) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['neutralRole']) { |
|
210 | 210 | $member->addRole($role); |
211 | 211 | $role = 'neut'; |
212 | 212 | break; |
213 | 213 | } |
214 | - if ((@(int)$allianceContacts['standings'] === -5 || @(int)$corpContacts['standings'] === -5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus5Role']) { |
|
214 | + if ((@(int) $allianceContacts['standings'] === -5 || @(int) $corpContacts['standings'] === -5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus5Role']) { |
|
215 | 215 | $member->addRole($role); |
216 | 216 | $role = 'red'; |
217 | 217 | break; |
218 | 218 | } |
219 | - if ((@(int)$allianceContacts['standings'] === -10 || @(int)$corpContacts['standings'] === -10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus10Role']) { |
|
219 | + if ((@(int) $allianceContacts['standings'] === -10 || @(int) $corpContacts['standings'] === -10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus10Role']) { |
|
220 | 220 | $member->addRole($role); |
221 | 221 | $role = 'red'; |
222 | 222 | break; |