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.
Options

Plugin to extend user data

edited May 2012 in Vanilla 2.0 - 2.8

I would like to extend the available information about users. How do I go about doing this in the best way when it comes to using the event callbacks?

I thought I could use some of the events in the UserModel but it seems I can't get any of the to fire. Which events are best used when extending the user data?

Any pointers would be helpful, if there's a manual page with listings of events I wouldn't mind looking at it but I can't seem to find one.

Best regards

Answers

  • Options
    x00x00 MVP
    edited May 2012

    You might want to look at MyProfile plugin.

    Basically the UserTable if you add columns to the User then it will be carried with the $User object, however in instance where it is not you can always Gdn::UserModel->GetID($UserID);, which will return a cached version when available, to ensure there is not excessive querying.

    However even better if you are going to add a lot of data is to use the UserMeta table, it is designed for key=>value meta, and work in much the same way that wordpress handles meta.

    grep is your friend.

Sign In or Register to comment.