@sD-
I started thinking about it, and I wonder if
modx_web_user_settings would be a more appropriate fit for "extended" profiling options...
...I’m sort of thinking out loud here...
I know this is the LAST thing you want to hear now that you have implemented the option for a custom joined table, but the structure of
modx_web_user_settings could easily allow for extended profiling, as it is tied directly to the internalKey, part of the default table structure, and infinitely expandable.
Users could pass a list of "custom fields" that are then entered into modx_web_user_settings, prefixed with "wlpe_"
e.g.
webuser : 123
setting_name : wlpe_alternate_phone
setting_value : 1234567890
Of course, there are some pitfalls:
modx_web_user_settings.setting_value is of type "Text". I see both pros and cons to this. As Text, at least it could be used to store almost any type of user attribute, even full on text/descriptions. However, from a programmer’s perspective, this isn’t the most efficient setup--especially if you only need to capture something like a Date/Time value.
Anywhow, I’m interested in other’s thoughts regarding this idea. Potentially, this could allow for on-the-fly declaration of custom profile fields, and through the use of "wlpe_" prefix, you could easily hook into the table for integration into the (GUI) Manager > Web Users.
Other things that I have been contemplating:
Well, what about an extended profile that requires fixed option values? e.g. A dropdown list with Timezone options? ( MDT, EDT, PST, PDT, etc)
Well, why not add an entry to
modx_web_user_settings with a webuser value of zero!
(0 will never exist, and I have used similar technique successfully in the past!)
e.g. attribute options record
webuser : 0
setting_name : wlpe_timezone
setting_value : Timezone Label Title:::MDT, EDT, PST, PDT
webuser : 0
setting_name : wlpe_favorite_music
setting_value : What is your favorite music?:::Rock,Rap,Alternative,Country,Gospel
I haven’t figured out the ideal way to maintain (via GUI/Snippet/Module?) such predetermined option values, but once they are in the table, coding would be pretty easy!
Another Idea: I wonder what it would take to allow categorization of profile sections?
E.g. the ability to group profile attributes
Maybe this could be defined similarly as above:
e.g. profile group example
webuser : 0
setting_name : wlpe_profile_group_1
setting_value : Profile Group 1 Title:::wlpe_timezone,wlpe_custom_2,wlpe_custom3
webuser : 0
setting_name : wlpe_profile_group_2
setting_value : A different Title here:::wlpe_favorite_color,wlpe_favorite_food,wlpe_favorite_music