Skip to content
Snippets Groups Projects
Commit ed064c1d authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

use cn if contains multiple parts

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1141 44740490-163a-0410-bde0-09ae8108e29a
parent 06ccf5ed
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,11 @@ class sspmod_smartnameattribute_Auth_Process_SmartName extends SimpleSAML_Auth_P
if (isset($attributes['displayName']))
return $attributes['displayName'][0];
if (isset($attributes['cn'])) {
if (count(explode(' ', $attributes['cn'][0])) > 1)
return $attributes['cn'][0];
}
if (isset($attributes['sn']) && isset($attributes['givenName']))
return $attributes['givenName'][0] . ' ' . $attributes['sn'][0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment