PostNuke: A Flexible Open Source Content Management System
home | forum | international support | contact us

Support Forum

Start ::  PostNuke 0.7 Support ::  XTE Support ::  Does UserX belong to GroupY?

Moderated by: Support Team

Bottom
Does UserX belong to GroupY?

  • Link to this postingPosted: 24.01.2008, 02:09
    Profile Homepage
    bronto
    rank:
    pnHelper pnHelper
    registered:
     September 2001
    Status:
    offline
    last visit:
    12.05.08
    Posts:
    113
    I need a way in a template to determine if a given user (not the logged in user, this isn't a permissions issue) belongs to a particular group. Is there a function I can call do to this?
  • Link to this postingPosted: 24.01.2008, 05:49
    Profile
    Topiatic
    rank:
    pnProfessional pnProfessional
    registered:
     November 2003
    Status:
    offline
    last visit:
    09.05.08
    Posts:
    1530
    I can think of a couple of ways to do this, can you tell me what is it exactly you're trying to accomplish with this so that you get an appropriate answer?

    -----
    viewTopiaryWorks($twWorks, $twRosterMaster)
  • Link to this postingPosted: 24.01.2008, 20:17
    Profile Homepage
    bronto
    rank:
    pnHelper pnHelper
    registered:
     September 2001
    Status:
    offline
    last visit:
    12.05.08
    Posts:
    113
    Certain groups need to maintain a certain level of anonymity, hiding behind usernames. Other groups need to have their full names displayed. Which are which don't relate well to permission level either.

    In any case, I found this:
    http://community.postnuke...ewpub-tid-8-pid-16.htm

    which after some modification is working well for me.
  • Link to this postingPosted: 24.01.2008, 20:46
    Profile Homepage
    kaffeeringe.de
    rank:
    pnProfessional pnProfessional
    registered:
     September 2002
    Status:
    offline
    last visit:
    11.05.08
    Posts:
    745
    That is not the way the PostNuke security system works. It doesn't check if you are member of a group but whether you have permissions for something or not. And the system is flexible enough that you can invent your own permission and use it.
    So if you add:
    HiddenGroup | ::hide | :: | edit
    you can check in your template:
    Code
    <!--[nocache]-->
    <!--[pnsecauthaction realm="0" comp="Stories::" inst=".*" level="ACCESS_ADMIN" assign="auth"]-->
    <!--[if $auth]-->
    Show secret stuff
    <!--[/if]-->
    <!--[/nocache]-->

    -----
    best regards from Kiel, sailing city

    Steffen Voß

    Member of the PostNuke Steering Committee
    Visit: Kaffeeringe.de - Internet & Kreativität
  • Link to this postingPosted: 26.01.2008, 05:03
    Profile Homepage
    bronto
    rank:
    pnHelper pnHelper
    registered:
     September 2001
    Status:
    offline
    last visit:
    12.05.08
    Posts:
    113
    This tests the permissions of the logged in user, which is not what I'm after.

    In any case, I got what I wanted via the plugin I referenced above.
  • Link to this postingPosted: 26.01.2008, 05:50
    Profile Homepage
    AmmoDump
    rank:
    pnProfessional pnProfessional
    registered:
     December 2003
    Status:
    offline
    last visit:
    08.05.08
    Posts:
    2635
    TopiaticI can think of a couple of ways to do this, can you tell me what is it exactly you're trying to accomplish with this so that you get an appropriate answer?



    brontoCertain groups need to maintain a certain level of anonymity, hiding behind usernames. Other groups need to have their full names displayed. Which are which don't relate well to permission level either.

    In any case, I found this:
    http://community.postnuke...ewpub-tid-8-pid-16.htm

    which after some modification is working well for me.


    Coincidence? icon_cool


    -----
    -- David Pahl -- (PostNuke Support Team)

    <div id="me" class="none" style="none" />

  • Link to this postingPosted: 31.01.2008, 23:54
    Profile Homepage
    bronto
    rank:
    pnHelper pnHelper
    registered:
     September 2001
    Status:
    offline
    last visit:
    12.05.08
    Posts:
    113
    AmmoDump
    Coincidence? icon_cool


    Yes :D

    I found it even before he replied, didn't realize he was the author until now. icon_smile
  • Link to this postingPosted: 01.02.2008, 08:48
    Profile
    Topiatic
    rank:
    pnProfessional pnProfessional
    registered:
     November 2003
    Status:
    offline
    last visit:
    09.05.08
    Posts:
    1530
    I didn't even follow the link to see where it led icon_rolleyes but I asked the question to see if what I had was appropriate.

    Feedback on your usage of the plugin would be appreciated as I'm considering turning it into a module.



    edited by: Topiatic, Feb 01, 2008 - 03:49 AM

    -----
    viewTopiaryWorks($twWorks, $twRosterMaster)

Start ::  PostNuke 0.7 Support ::  XTE Support ::  Does UserX belong to GroupY?

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to PostNuke