I have implemented a custom auth backend using the basic.class.php
I am using the trustExternal function, and everyuthing works well, except that groups are not recognized.
This is what I am doing, after fetching the user's record from my database:
$fname = "$row[fname]";
$lname = "$row[lname]";
$email = "$row[email]";
#Groups are stored in my database as a comma separated list:
# such as "user,admin,team"
$grps = explode (",","$row[grps]");
#set the globals for dokuwiki
$USERINFO['name'] = $fname . " ". $lname;
$USERINFO['mail'] = $email;
$USERINFO['grps'] = $grps;
$_SERVER['REMOTE_USER'] = $user;
$_SESSION[DOKU_COOKIE]['auth']['user'] = $user;
$_SESSION[DOKU_COOKIE]['auth']['pass'] = $pass;
$_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO;
What is happening is that I can login OK, but then any page I try to access, it gives me an access denied. If I go back to plain auth, and the user has same groups, it works OK.
What I am doing wrong?
-- Jossi