Fork me on GitHub

API documentation - group membership  Bottom

  • Could anyone point me to the documentation that explains the API calls that will discover the group membership of the logged on user? The info on http://docs.postnuke.com/index.php?module=Static_Docs&func=view&f=pnapi/ch04.html doesn't appear to mention groups.
  • Code

    /**
     * get all of a users group memberships
     * @author Mark West
     * @since v1.8
     * @param int args['uid'] user id
     * @return mixed array of group items, or false on failure
     */

    function Groups_userapi_getusergroups($args)


    may help you. Do not use this to decide about a users permission!

    --
    "He is not dangerous, he just wants to play...."
  • in 760, the groups module is WELL documented, as fas as variables you can send, and what is returned.
  • The groups module functions won't be mentioned in the originally referenced documenation since this lists CORE API's only. Groups functionality is handled by the groups module (.760+). All API compliant modules within the base package should be as well documented as the groups module since phpdoc comments are an integral part of the coding standards applied to PostNuke.

    I will, shortly, run another phpdoc dump for the .76+ codebase listing all module API's.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • That's useful, thanks for your contributions. I should have mentioned that the site in question is not running on the current PN - it's actually a couple of years old icon_frown . Does this make any difference, bearing mind that the site should be upgraded in the next couple of months?
  • you cant use that API call, i think its has only been implented since 760. you would have to do the SQL manuall in the function you want to use it for.


    download the 760 release, and take a look at the code to see how it works
  • Or even better: Download .761 icon_smile

    --
    "He is not dangerous, he just wants to play...."
  • 761?

    ok, i just read the announcement. good call.

This list is based on users active over the last 60 minutes.