Forum Discussion

briancostea's avatar
briancostea
Contributor
13 years ago

userInfo with Ranking Formula

Can you please tell me where I can find some documentation on what I am allowed to call with the userInfo fucntion when creating a custom ranking formula?

 

Thanks

  • JakeR's avatar
    JakeR
    13 years ago

    briancostea wrote:

     

    I just want to clarify that no documentation exists for what paramters I can use when calling the "userInfo" function inside the ranking system?


     To my knowledge, there is not a list of documented parameters that you can call / use inside the ranking system.  Ideally, the tooltip within the admin would be comprehensive and list them all.


    briancostea wrote:

    Are there net variables for these or are there "deleted" variables that I can compute the net?


    There are variables for deleted also, but rather than having to compute that, I think it is better to just give you the 'net' variables.  Here they are:

     

    net_idea_threads
    net_idea_comments
    net_blog_articles
    net_blog_comments

     

    The TKB article variable that I supplied earlier is actually for the number of "Knowledge Base Articles Started" (not how many were actually published, much less, how many were deleted)

     

14 Replies

  • jimr's avatar
    jimr
    Mentor
    13 years ago

    Hey Brian,

     

    I'm a little late to the party so you may have already found this, but I think the info you want is in the "Metrics_List 11_11.pdf" file linked from this TKB article.

     

    Jim

     

  • Hi guys, sorry for pushing this veeery old topic but I just stumbled upon it and have an addition for others like me:

    You can get all user settings with the following APIv2 Call:

    SELECT id, user.local FROM settings WHERE user.id = 'ANY_USER_ID'

     

    Unfortunately it is not possible to filter for settings starting with "user." or "profile." and there is a lot of unuseful settings in this context. But with a small script looping through the settings, you could filter these.
    I'm just to lazy to provide a full list now 😁

    As far is I tested, every setting with "user." and "profile." can be used within the role-checks, even customfields created by khoros support:

    (userInfo("profile.devices") == "my_shiny_device")

     

    I haven't tested this with other settings outside the user/profile scope.

  • mbiel Thank you, you just saved me endless hours with telling me for custom profile attributes it's as easy as profile.xxxx - I would have never tried that when everywhere else they start with "custom"!!!!

  • Spamming the thread with my own answer - The proper way to add custom profile attributes (or at least in my case) was like this (Thanks goes to Chad in Support!)

    (userInfo("custom_profile.course_1") == true)