Custom user fields tied with add-on

QuackieMackie

Active member
I think this would be a handy feature for us to have. Currently they can only be made by either inserting your own row in the database, or by creating it manually.

This would also be handy if we could provide a handler class, so we could have dynamic data in the custom user fields, rather than hard coded values.

I don't have a way of handling dynamic data, but I have already created a method to install and remove custom user fields. This can be found here: https://github.com/Sylphian-Network/Sylphian-Library/blob/master/Install/SylInstallHelperTrait.php
 
Upvote 4
I mentioned previously not having a way of handling dynamic data, this has now somewhat been created here. You pass in the new choices for a drop down, and the field_id your updating, and it will update them for you.

This is just to give you a rough picture of what I'm suggesting for Xenforo core.
 
My suggestion for the same back in 2014 didn't go anywhere. ☹️

 
My suggestion for the same back in 2014 didn't go anywhere. ☹️

I wonder why nothings been done about this after so long. :(
I didn't see this though so thank you for linking it.
 
I wonder why nothings been done about this after so long. :(
Yeah, I'm a bit surprised it still isn't supported. Custom User Fields and Custom Thread Fields can really come in handy but neither can be associated with an add-on. Some things that devs are adding new columns in table for could be just as easily done with a custom field. 👀
 
Yeah, I'm a bit surprised it still isn't supported. Custom User Fields and Custom Thread Fields can really come in handy but neither can be associated with an add-on. Some things that devs are adding new columns in table for could be just as easily done with a custom field. 👀
Exactly, it would make life a bit easier. Fingers crossed this will act as a reminder for devs, this is a needed feature after all.
 
Don't see why it can't be done. But not all people will have the same fields. Unless your addon does it when it installs. I guess you could tell people they need to make them. Your addon can pull from the field id then.
 
Last edited:
Not everyone will have the same custom user fields. So, if your addon needs 1 or 2 or 3 of them, you would have to have the user make them up or have them install when your addon installs.
As far as i'm aware custom user fields do not have permissions so I don't see this being a problem.
The only problem I could see occuring is for required fields, something i've faced previously, is when the multi options get updated, and a user was on an option that was changed, they need to go and reselect.
 
Not sure you will get a round that. Maybe an audit trail is a good idea. An export and then an import of the user settings.
Yeah I suppose, I could turn the update into a job so it executes when it's needed rather than straight away.
When I get a second I'll look into switching up the implementation.
 
Yeah I suppose, I could turn the update into a job so it executes when it's needed rather than straight away.
When I get a second I'll look into switching up the implementation.
Doesn't hurt to try stuff. :)

Track option sets by version. When a change occurs, notify users whose selections are affected and prompt them to review
 
I'm... I'm not sure you guys are having the same conversation. 🤔

Not everyone will have the same custom user fields. So, if your addon needs 1 or 2 or 3 of them, you would have to have the user make them up or have them install when your addon installs.
Having them installed as part of the add-on is the reason for this suggestion.
 
I would like to see this for every custom field type, users, threads, resources, media.

There's no guarantee the desired custom field id would be unused at the time of add-on install, so a conflict resolution system would be needed.
 
I would like to see this for every custom field type, users, threads, resources, media.

There's no guarantee the desired custom field id would be unused at the time of add-on install, so a conflict resolution system would be needed.
It would work similar to other add-on parts, add-on developers would use the vendor_addon_ prefix or something similar.
 
Back
Top Bottom