Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chg: Removal of anonymous functions #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions authclient/FacebookAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,6 @@ protected function defaultNormalizeUserAttributeMap()
{
return [
'username' => 'name',
'firstname' => function ($attributes) {
if (!isset($attributes['name'])) {
return '';
}
$parts = mb_split(' ', $attributes['name'], 2);
if (isset($parts[0])) {
return $parts[0];
}
return '';
},
'lastname' => function ($attributes) {
if (!isset($attributes['name'])) {
return '';
}
$parts = mb_split(' ', $attributes['name'], 2);
if (isset($parts[1])) {
return $parts[1];
}
return '';
},
'email' => function ($attributes) {
if (empty($attributes['email'])) {
throw new NotFoundHttpException(Yii::t('AuthFacebookModule.base', 'Please add a valid email address to your Facebook account to be able to proceed.'));
}
return $attributes['email'];
},
];
}
}
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.0.1 (Unreleased)
------------------
- Chg: Removal of anonymous functions

1.0.0 (Unreleased)
------------------
- Initial release
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Integrating Facebook Sign-In (OAuth 2.0).",
"keywords": [
],
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/humhub-contrib/auth-facebook",
"humhub": {
"minVersion": "1.6"
Expand Down