diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php
index 6157d012ec..5d0cfd8002 100644
--- a/phpgwapi/inc/class.accounts_ldap.inc.php
+++ b/phpgwapi/inc/class.accounts_ldap.inc.php
@@ -455,7 +455,7 @@
function get_list($_type='both', $start = '',$sort = '', $order = '', $query = '', $offset = '',$query_type='')
{
- //print "\$_type=$_type, \$start=$start , \$sort=$sort, \$order=$order, \$query=$query, \$offset=$offset
";
+ //print "\$_type=$_type, \$start=$start , \$sort=$sort, \$order=$order, \$query=$query, \$offset=$offset, \$query_type=$query_type
";
$query = strtolower($query);
if($offset)
{
@@ -486,15 +486,15 @@
$query .= '*';
// fall-through
case 'exact':
- $filter .= "(|(uid=$query)(sn=$query)(cn=$query)(givenname=$query)(email=$query))";
+ $filter .= "(|(uid=$query)(sn=$query)(cn=$query)(givenname=$query)(mail=$query))";
break;
case 'firstname':
case 'lastname':
case 'lid':
case 'email':
$to_ldap = array(
- 'firstname' => 'sn',
- 'lastname' => 'givenname',
+ 'firstname' => 'givenname',
+ 'lastname' => 'sn',
'lid' => 'uid',
'email' => 'mail',
);