Skip to content

Commit

Permalink
31406: merge 2 reqex call into one
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Kopera committed May 17, 2019
1 parent cd900b6 commit 1eb70d8
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -44,10 +44,10 @@ protected function getPreAuthenticatedData(Request $request)
$user = null;
if ($request->server->has($this->userKey)) {
$user = $request->server->get($this->userKey);
} elseif ($request->server->has($this->credentialKey) && (
preg_match('#/emailAddress=(.+\@.+\..+)(/|$)#', $request->server->get($this->credentialKey), $matches)
|| preg_match('/emailAddress=(.+\@.+\.[^,]*)/', $request->server->get($this->credentialKey), $matches)
)) {
} elseif (
$request->server->has($this->credentialKey)
&& preg_match('#emailAddress=(.+\@.+\.[^,/]+)($|,|/)#', $request->server->get($this->credentialKey), $matches)
) {
$user = $matches[1];
}

Expand Down

0 comments on commit 1eb70d8

Please sign in to comment.