Add profile field to "Potential Users" list?

Add profile field to "Potential Users" list?

by VI Webmaster -
Number of replies: 4
Is it possible to add another profile field to the "Potential Users" on the assign roles page?

I believe it would be in assign.php on line 381

$availableusers = get_recordset_sql('SELECT id, lastname, firstname, email

If I delete lastname, firstname or email they disappear in the "Potential Users" list. I have tried to add in "city" or "city/town" but every time I do ALL of the potential user information disappears.

If I could add another field, specifically a user field I have created I would be able to sort by that field and essentially assign roles by a makeshift group.

Does that make sense?

We have different "sites" across the U.S. with students, and each site needs to be in different courses. I'm trying to find a way to assign roles other than by name (which takes forever) If I could sort by my custom field "Site ID" then I could assign all of the users in two seconds.

Any help would be much appreciated.
Thanks
Kyle
Average of ratings: -
In reply to VI Webmaster

Re: Add profile field to "Potential Users" list?

by VI Webmaster -
Never mind, I had a friend figure it out for me!
Thanks,
Kyle
In reply to VI Webmaster

Re: Add profile field to "Potential Users" list?

by Michael Skwara -

Kyle,

Would you please share your solution?  I knew how to do this in 1.6, but am preparing for 1.9 and am still working on a solution.

Thanks,

Michael

In reply to Michael Skwara

Re: Add profile field to "Potential Users" list?

by VI Webmaster -
Sorry for not replying, I never received an email for your post.

I can't remember exactly how my friend added the user profile field, but I do remember we were able to sort by them in - /admin/roles/assign.php

I have attached our assign.php (marked NEW)

if you run a "Find Differences" against the file you can see all of the places my friend edited the file.

I am pretty sure he edited a couple of other files, I am trying to find out what.

Basically his changes allowed us to drop all students who have graduated by only showing students under custom user field "Ungraduated".

Then we were able to sort our students by another custom user field "SiteID" which we just re-directed into the "country" field in the assign.php.

It's kinda confusing, I will try to find out more.

Kyle
In reply to VI Webmaster

Re: Add profile field to "Potential Users" list?

by Michael Skwara -

Many thanks! I'll take a look at your file.