trying to decided the best way to do this
I’ve got some users who I want to have extended fields. Now I can set these using extended fields, but is it possible to search for a group of users based on extended fields. Or am I best extending modUser and storing these fields in an additional table and searching this.
You can do it, but it’s kind of ugly. The extended fields are in the form of a JSON string in one of the fields of the user profile table (not the user table). I think you have to get all the profiles, get each one’s extended fields, JSON-decode them, and then check for your value, though there may be an easier way. If you could put the information in an unused field of the user profile, it would help. Then you could do a join and search with a single query instead of a brute-force search.
You can certainly create a new table to store the user id and your value, but I wouldn’t alter any existing tables.
ok extending modUser it is then.