Bind new field in #__users table to contact info t

16 years 4 months ago #52760 by slycaulfey
Problem: I want to add a yes/no radio field named user_pref to jos_users table and have it editable in contact info tab. So when a user edits their contact info from community builder and changes the user_pref field, the changes are reflected in #__users table.
I know I may have to hack cb core files and that is ok. Just do not know where to start.

Already tried:
Created new filed user_pref in #__users and in #__comprofiler_fields table, with #__comprofiler_field values yes/no.
Hacked the class mosUser in Joomla to include new filed.
Bound new row (usr_pref) cell(table) in #__comprofiler_fields table to #__ users table.
Tried setting #__comprofiler_fields cell (calculated) to 1 but nothing worked.
The new field shows in edit interface with no value and changes are not saved in either table.
The only way I can get it to work is to put the new field in #__users params cell but that is not what I want.
Can it be done in cb core plugin?

Please Log in to join the conversation.

16 years 4 months ago #52763 by nant
don't know what you are trying to do and way all the hacking ...

Why not just create a new CB field like you want in the backend CB Fields management and add it to the COntact info tab?

Please Log in to join the conversation.

16 years 4 months ago #52831 by slycaulfey
I will be checking this new field from various places throughout the site and want it bound to the users table, so I can put it in the session table under the field specified in my previous post. I will check the value of this flag using $my->user_pref, which is available to all components, mambots, modules and plugins. I do not want to run a hundred sql statements to retrieve this value from comprofiler_fields table.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.179 seconds

Facebook Twitter LinkedIn