Issue Details (XML | Word | Printable)

Key: MDL-12967
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Martin Dougiamas
Reporter: Anthony Borrow
Votes: 1
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Messaging: Include search on user email field (possibly even username)

Created: 14/Jan/08 12:49 AM   Updated: 14/Jan/08 01:44 AM
Return to search
Component/s: Messages
Affects Version/s: 1.8
Fix Version/s: None

File Attachments: 1. File MDL-12967.diff (1 kB)
2. File MDL-12967_username.diff (1 kB)

Issue Links:
Relates
 

Participants: Anthony Borrow and Martin Dougiamas
Security Level: None
Affected Branches: MOODLE_18_STABLE


 Description  « Hide
In other areas where Moodle searches for users, the fullname and email fields are searched. I also think that the username field should be searched. To be consistent, I think that when searching for users within the messaging system, the email field should also be checked.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Anthony Borrow added a comment - 14/Jan/08 12:52 AM
The attached diff file is for Moodle 18STABLE and adds the search to include email.

Anthony Borrow made changes - 14/Jan/08 12:52 AM
Field Original Value New Value
Attachment MDL-12967.diff [ 12821 ]
Anthony Borrow added a comment - 14/Jan/08 01:12 AM
I've modified the file to respect the maildisplay settings as followed:

If one is searching from the front page, then it requires the maildisplay to be 1 and will not display users who only want their email displayed to those with whom they share a course. Searching from within a course will display when maildisplay is not 0 (i.e. the user has requested to hide their email from others). Even though the email address is not being displayed, doing this avoids fishing for a person's email address.

Peace - Anthony


Anthony Borrow made changes - 14/Jan/08 01:13 AM
Attachment MDL-12967.diff [ 12821 ]
Anthony Borrow added a comment - 14/Jan/08 01:14 AM
Here is the patch that respects the user's maildisplay settings. Peace - Anthony

Anthony Borrow made changes - 14/Jan/08 01:14 AM
Attachment MDL-12967.diff [ 12822 ]
Anthony Borrow added a comment - 14/Jan/08 01:41 AM
I went ahead and create a patch to include the searching of the username field as well. This is related to MDL-3982 which requests that the username field be included on searches for users.

Anthony Borrow made changes - 14/Jan/08 01:41 AM
Attachment MDL-12967_username.diff [ 12823 ]
Anthony Borrow added a comment - 14/Jan/08 01:44 AM
MDL-3982 requests that the username field be searched when searching for users. MDL-12967 requests that the email (and possibly) the username field be included when searching for users via the messaging system (/message/lib.php's search_users function). Resolving both of these would allow for user's to be found by entering a name that is in either the firstname, lastname, username, or email fields.

Anthony Borrow made changes - 14/Jan/08 01:44 AM
Link This issue has a non-specific relationship to MDL-3982 [ MDL-3982 ]