Skip to content

Commit

Permalink
Merge pull request #8 from humhub/fix/6-redirection-to-registration-f…
Browse files Browse the repository at this point in the history
…ails

Fix #6: Redirection to registration form fails (e.g. when a profile f…
  • Loading branch information
luke- authored Oct 11, 2024
2 parents 02c8688 + 6ffa398 commit 7449fc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
13 changes: 3 additions & 10 deletions authclient/LinkedinAuthV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace humhubContrib\auth\linkedin\authclient;

use yii\authclient\clients\LinkedIn;
use humhub\helpers\ArrayHelper;

/**
* LinkedIn allows authentication via LinkedIn OAuth.
Expand Down Expand Up @@ -45,15 +44,9 @@ protected function defaultNormalizeUserAttributeMap()
return [
'id' => 'sub',
'username' => 'displayName',
'firstname' => function ($attributes) {
return ArrayHelper::getValue($attributes, 'given_name', '');
},
'lastname' => function ($attributes) {
return ArrayHelper::getValue($attributes, 'family_name', '');
},
'email' => function ($attributes) {
return ArrayHelper::getValue($attributes, 'email', '');
},
'firstname' => 'given_name',
'lastname' => 'family_name',
'email' => 'email',
];
}
}
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
1.1.1 (Unreleased)
--------------------
- Enh #7: Use PHP CS Fixer
- Fix #6: Redirection to registration form fails (e.g. when a profile field is required) with version 2

1.1.0 (June 7, 2024)
--------------------
Expand Down

0 comments on commit 7449fc9

Please sign in to comment.