Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Get the poster's role and permissions.

edited January 2007 in Vanilla 1.0 Help
I am in the middle of trying to fulfill a feature request for the RelNoFollow plugin (which parses HTML on posts), and I am having the darndest time trying to figure out how to get the role and/or permissions of the person who posted a comment. I would prefer the permissions if possible - but if not, I would need the role and the permissions set for the role. TIA

Comments

  • Options
    You can check a permission using:
    $Context->Session->User->Permission('PERMISSION_permissionnamehere')
  • Options
    I'm sorry, I don't think I was clear enough. A user is browsing the forum and viewing a post made by someone else. I need to get the permissions not of the person who is currently browsing but the person who made the post.
  • Options
    Ok, I found the author's role ID by doing a var_dump on the $Object parameter. Now I just need to find out how to check the permissions are assigned to that role...
  • Options
    Just figured it out, actually. Look for an update soon.
This discussion has been closed.