[dokuwiki] Re: What is the correct way to compile a list of groups of a specific DokuWiki user?

  • From: "Phy" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "i" for DMARC)
  • To: DokuWiki Mailinglist <dokuwiki@xxxxxxxxxxxxx>
  • Date: Sat, 12 Jan 2019 11:38:44 -0500

Hello,

Sorry for the late reply (and happy new year!).

On Wed, Oct 24, 2018 at 3:55 AM Frank Thommen <list.dokuwiki@xxxxxxxxxx>
wrote:

How does the "&do=check" mechanism gather the complete list of groups a
user is in?  Maybe $auth->getUserData($user) isn't the officially
correct way


I am not an expert here, but I (finally) have some time reading the related
code recently. DokuWiki calls $auth->getUserData($user) to populate the
value of $USERINFO['grps']. Then virtualgroups modifies the value of
$USERINFO['grps'] to add other groups. Finally $USERINFO['grps'] should
be used to check acl (also this is where check() is reading from -
https://github.com/splitbrain/dokuwiki/blob/4c0210e5bf2afd5bd6ca665d1f82758095f4c480/inc/infoutils.php#L230
).

Hope this helps.

Regards,
Phy

Other related posts: