Userlist in a field

18 years 4 weeks ago #9020 by Feral
Userlist in a field was created by Feral
I apologize if this has been posted anywhere else, but i'm wondering if anyone could help me?

I wish to create a field called 'Referral' which users complete upon registration, but wish to add a dropdown list of current members, similar to the one included in uddeIM when composing a new message.

Is this at all possible?

If so any help would be greatly appreciated.

Feral....*8)

Please Log in to join the conversation.

18 years 4 weeks ago #9039 by mikko
Replied by mikko on topic Re:Userlist in a field
You need to do some coding to get that work. What you need is to get all users appear in the #__comprofiler_field_values table.

Either write a plugin that on acceptance of a new user adds that to the table or write a script that gets data from #__comprofiler and inserts that to the #__comprofiler_field_values.

mikko

Please Log in to join the conversation.

18 years 4 weeks ago #9053 by Feral
Replied by Feral on topic Re:Userlist in a field
I thought as much.

Not too good with coding though. This is what's been holding me back.

Please Log in to join the conversation.

18 years 4 weeks ago #9056 by mikko
Replied by mikko on topic Re:Userlist in a field
One nested SQL query in cron should do the job.

Something like "select into #__comprofiler_field_values username as value, 'some id' as fieldid from #__users where username not in (select value from #__comprofiler_field_values where fieldid='some id')"

(you need a fairly recent mysql version for this)

-mikko

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.188 seconds

Facebook Twitter LinkedIn