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__KaM_ New
edited March 2015 in Vanilla 2.0 - 2.8

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.

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    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 with Join 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.

Sign In or Register to comment.