Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to override JoinUsers method?
![_KaM_](https://secure.gravatar.com/avatar/07ca09c481e689bba0f20b16b96f2eac/?default=https%3A%2F%2Fvanillicon.com%2F2a58c0bc01747658c0c11ab6ec0b4935_100.png&rating=g&size=100)
Hi there,
I want to override function JoinUsers which placed in UserModel. The point of this need in the next string:
$Join = GetValue('Join', $Options, array('Name', 'Email', 'Photo'));
for some reasons i want to have extended set of fields in select query with left join GDN_Users table, in other words i want to have this string looks like this:
$Join = GetValue('Join', $Options, array('Name', 'Email', 'Photo', 'Gender', 'Nationality', 'etc'));
in this way i can use those fields in the UserBuilder render function. Is there any way for make this without extends UserModel ?
Thanks in advance.
0
Comments
I don't see a possibility for that but you might suggest to add a new FireEvent in that function so that you can change the parameter columns from within a plugin.
Or may be it will be better suggest for create an array like 'array('Name', 'Email', 'Photo')' in the config file?
You realise that is a callback? it is dependent on JoinUsers not being used
$Options
withJoin
entry.You could suggest it, but, won't be included in the core for some time.
A users are cached anyway, you can create you own function, that zips the additional meta.
grep is your friend.