- Issue created by @gugalamaciek
- Issue was unassigned.
- Status changed to Needs review
8 months ago 7:19pm 8 November 2023 - last update
8 months ago 100 pass
When I'm trying to login, I receive this error:
The website encountered an unexpected error. Please try again later.
Error: Call to a member function id() on array in Drupal\openid_connect\OpenIDConnect->saveUserinfo() (line 696 of modules/contrib/openid_connect/src/OpenIDConnect.php).
Current implementation:
$account_by_mail = $this->userStorage->loadByProperties(['mail' => $claim_value]);
if (empty($account_by_mail) || ($account_by_mail->id() == $account->id())) {
Proposed improvement (use current() in second if condition):
$account_by_mail = $this->userStorage->loadByProperties(['mail' => $claim_value]);
if (empty($account_by_mail) || (current($account_by_mail)->id() == $account->id())) {
Needs review
3.0
Code