packages/ssoinabox-webui/root/usr/local/share/ssoinabox/htdocs/includes/ldap.php
changeset 4 2212b2ded8bf
parent 3 a044870a9d3d
child 8 f68fdcc18df9
--- a/packages/ssoinabox-webui/root/usr/local/share/ssoinabox/htdocs/includes/ldap.php	Fri Jan 11 00:32:54 2013 -0500
+++ b/packages/ssoinabox-webui/root/usr/local/share/ssoinabox/htdocs/includes/ldap.php	Fri Jan 11 05:41:41 2013 -0500
@@ -30,6 +30,7 @@
 		'telephoneNumber'
 		, 'mobile'
 		, 'mail'
+		, 'sshPublicKey'
 	);
 
 // END CONSTANTS
@@ -134,13 +135,15 @@
 
 function ldap_array_cleanup($arr)
 {
+	global $ldap_add_multiple;
+	
 	$result = array();
 	foreach ( $arr as $k => $v )
 	{
 		if ( is_int($k) || $k == 'count' )
 			continue;
 		
-		if ( $v['count'] === 1 )
+		if ( $v['count'] === 1 && !in_array($k, $ldap_add_multiple) )
 			$v = $v[0];
 		else
 			unset($v['count']);
@@ -304,6 +307,7 @@
 				, 'inetOrgPerson'
 				, 'organizationalPerson'
 				, 'posixAccount'
+				, 'ldapPublicKey'
 				)
 			, 'gn' => array($gn)
 			, 'sn' => array($sn)