Search by username

aharown07 - December 12, 2008 - 05:43
Project:Advanced User
Version:6.x-2.x-dev
Component:Miscellaneous
Category:feature request
Priority:critical
Assigned:earnie
Status:closed
Issue tags:accepted feature request
Description

Is there a way to include the user name field in the list of filterable fields? I can't believe it isn't there, and I can't figure out how to add it.

#1

earnie - January 13, 2009 - 15:45
Category:support request» feature request
Priority:normal» critical
Assigned to:Anonymous» earnie

I will see what I can do eventually. I don't currently have the time to spare but this is a critical request.

#2

earnie - January 13, 2009 - 15:47

#3

aharown07 - January 18, 2009 - 04:03

Hey, thanks. Hope it works out.

#4

imclean - February 26, 2009 - 05:33

A quick & dirty for 6.x-2.x-dev version, stick this in filters.inc in the advuser_filters() function where appropriate.

<?php
  $filters
['username'] = array(
   
'title' => t('Username'),
   
'where' => "u.name %op '%s'",
   
'form_type' => 'textfield',
  );
?>

Anything majorly wrong with this approach? Apart from not being able to search on a partial username.

#5

earnie - February 26, 2009 - 14:00

@imclean: Have you tried it? It should work even with a partial name using the 'CO' => 'contains' operator.

#6

imclean - February 26, 2009 - 21:40

@earnie: Indeed it does, I didn't realise the operator was for all criteria. It works well. Good moodule, btw.

A nice feature, although certainly not critical, would be to move the operator drop down and the Filter button to the row selected.

#7

earnie - February 27, 2009 - 13:12
Version:5.x-2.0» 6.x-2.x-dev

A nice feature, although certainly not critical, would be to move the operator drop down and the Filter button to the row selected.

If you want to work up a patch and create a new feature request I will consider it.

Earnie

#8

earnie - February 27, 2009 - 13:21
Status:active» fixed

I've committed to CVS @imclean's suggestion in #4.

#9

System Message - March 13, 2009 - 13:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#10

aharown07 - March 14, 2009 - 01:22

Works great. Many thanks!

 
 

Drupal is a registered trademark of Dries Buytaert.