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

  • You can check a permission using:
    $Context->Session->User->Permission('PERMISSION_permissionnamehere')
  • 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.
  • 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...
  • Just figured it out, actually. Look for an update soon.
This discussion has been closed.