diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-01-28 15:58:40 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-01-28 15:58:40 +0100 |
commit | 590c4aa710077ae82a5af0ec4477a00eafe791dc (patch) | |
tree | ed959d130878f45242276d13da0fca398da1157b /lib/user/database.php | |
parent | c00b66fe5bb37403e4dec1ede9d509947b795df0 (diff) | |
download | nextcloud-server-590c4aa710077ae82a5af0ec4477a00eafe791dc.tar.gz nextcloud-server-590c4aa710077ae82a5af0ec4477a00eafe791dc.zip |
search display name instead of uid; fix key/value order for array access
Diffstat (limited to 'lib/user/database.php')
-rw-r--r-- | lib/user/database.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/user/database.php b/lib/user/database.php index bed97f25fdb..7deeb0c4697 100644 --- a/lib/user/database.php +++ b/lib/user/database.php @@ -155,7 +155,7 @@ class OC_User_Database extends OC_User_Backend { */
public function getDisplayNames($search = '', $limit = null, $offset = null) { $displayNames = array(); - $query = OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users` WHERE LOWER(`uid`) LIKE LOWER(?)', $limit, $offset);
+ $query = OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users` WHERE LOWER(`displayname`) LIKE LOWER(?)', $limit, $offset);
$result = $query->execute(array($search.'%'));
$users = array();
while ($row = $result->fetchRow()) { |