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

Add: Ability to merge firstname and lastname when fullname is not the… #12

Open
wants to merge 7 commits into
base: development
Choose a base branch
from

Conversation

brijm-improwised
Copy link
Collaborator

Closes #11

Fixes Issue : LDAP_DISPLAY_NAME_ATTRIBUTE merge multiple values

Changes proposed

  • Add Ability to merge two values firstname as givenName and lastname as sn when fullname is not there in LDAP
  • In Test case add firstname as givenName and lastname as sn

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

@@ -82,17 +82,24 @@ public function getUserDetails(string $userName): ?array
$idAttr = $this->config['id_attribute'];
$emailAttr = $this->config['email_attribute'];
$displayNameAttr = $this->config['display_name_attribute'];
$firstName = explode(',', $displayNameAttr)[0];
$lastName = explode(',', $displayNameAttr)[0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brijm-improwised it should be 1. Also, you should check length before accessing index 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LDAP_DISPLAY_NAME_ATTRIBUTE merge multiple values
2 participants