@@ -212,38 +212,38 @@ function getUsersFromSearch($search, $userDao, $limit = 14, $group = true, $orde
212
212
if ($ isAdmin )
213
213
{
214
214
$ sql ->where (' ( ' .
215
- $ this ->database ->getDB ()->quoteInto ('firstname LIKE ? ' , '% ' .$ search .'% ' ).' OR ' .
216
- $ this ->database ->getDB ()->quoteInto ('lastname LIKE ? ' , '% ' .$ search .'% ' ).') ' )
215
+ $ this ->database ->getDB ()->quoteInto ('u. firstname LIKE ? ' , '% ' .$ search .'% ' ).' OR ' .
216
+ $ this ->database ->getDB ()->quoteInto ('u. lastname LIKE ? ' , '% ' .$ search .'% ' ).') ' )
217
217
->limit ($ limit )
218
218
->setIntegrityCheck (false );
219
219
}
220
220
else
221
221
{
222
- $ sql ->where ('(privacy = ' .MIDAS_USER_PUBLIC .' OR ( ' .
222
+ $ sql ->where ('(u. privacy = ' .MIDAS_USER_PUBLIC .' OR ( ' .
223
223
$ subqueryUser .')>0 ' .') AND ( ' .
224
- $ this ->database ->getDB ()->quoteInto ('firstname LIKE ? ' , '% ' .$ search .'% ' ).' OR ' .
225
- $ this ->database ->getDB ()->quoteInto ('lastname LIKE ? ' , '% ' .$ search .'% ' ).') ' )
224
+ $ this ->database ->getDB ()->quoteInto ('u. firstname LIKE ? ' , '% ' .$ search .'% ' ).' OR ' .
225
+ $ this ->database ->getDB ()->quoteInto ('u. lastname LIKE ? ' , '% ' .$ search .'% ' ).') ' )
226
226
->limit ($ limit )
227
227
->setIntegrityCheck (false );
228
228
}
229
229
230
230
231
231
if ($ group )
232
232
{
233
- $ sql ->group (array ('firstname ' , 'lastname ' ));
233
+ $ sql ->group (array ('u. firstname ' , 'u. lastname ' ));
234
234
}
235
235
236
236
switch ($ order )
237
237
{
238
238
case 'name ' :
239
- $ sql ->order (array ('lastname ASC ' , 'firstname ASC ' ));
239
+ $ sql ->order (array ('u. lastname ASC ' , 'u. firstname ASC ' ));
240
240
break ;
241
241
case 'date ' :
242
- $ sql ->order (array ('creation ASC ' ));
242
+ $ sql ->order (array ('u. creation ASC ' ));
243
243
break ;
244
244
case 'view ' :
245
245
default :
246
- $ sql ->order (array ('view DESC ' ));
246
+ $ sql ->order (array ('u. view DESC ' ));
247
247
break ;
248
248
}
249
249
$ rowset = $ this ->database ->fetchAll ($ sql );
0 commit comments