Assign Role search users by id along with name and email

Assign Role search users by id along with name and email

by Amir Mustafa -
Number of replies: 4

Hello Developers,

In the role assign page, I need to add search by id functionality along with user name + user email.

I am not able to find the query. Please guide me.

Thanks You smile 

Attachment 1.png
Attachment 2.png
Average of ratings: -
In reply to Amir Mustafa

Re: Assign Role search users by id along with name and email

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Don't try to find the query.

Instead, set $CFG->showuseridentity in your config.php file to include id. Something like 

$CFG->showuseridentity = 'id,email';

or whatever fields you want to be able to search on.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Assign Role search users by id along with name and email

by Amir Mustafa -

Thank you Tim Sir. 

Your solution worked like a charm. smile smile

In reply to Tim Hunt

Re: Assign Role search users by id along with name and email

by Amir Mustafa -

Sir is it possible to get the data from the other table which contains the data from different table which holds the user table id.

In my case the data contains mdl_user_info_data table (this is other section of the table).

It holds userid and column name

Thank you.

In reply to Amir Mustafa

Re: Assign Role search users by id along with name and email

by Amir Mustafa -

Sir 

Can you guide me the place in which page query is there is written.

Thank you.