[dokuwiki] Problem with MySQL Authentication

  • From: Paul Woods <paul@xxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 14 Dec 2005 16:35:21 -0500

I'm having a problem with MySQL authentication using dokuwiki-2005-9-22. First, is MySQL authentication even supposed to work on this version? The code all seems to be there even though it's marked develonly at http://wiki.splitbrain.org/wiki:oo_auth_mysql. I really only need the ability to load a user's info and group memberships so that ACLs can be checked. I already have a login process and user management interface outside of DokuWiki. I am able to login to my site and use DokuWiki just fine when I have it set to plain authentication.

The error message I am getting is "Invalid argument supplied for foreach() in e:\data\wwwroot\irn\wiki\inc\auth\mysql.php on line 122". This is the point where the group list for the given user is retrieved.

I have verified that my getGroups query returns rows. What's odd is that even if I remove the user-group relationships for the given user (meaning no rows should be returned) then I still get the same error on line 122. I would think that line 120 would be executed to assign the default group if no rows are returned from the query.

That said, I am an ASP guy trying to fumble through all of this PHP, so I may be misinterpreting things or overlooking the obvious.

Here is the pertinent code:

119  if(!count($result)){
120    $info['grps'][] = $conf['defaultgroup'];
121  }else{
122    foreach($result as $row){
123      $info['grps'][] = $row['group'];
124    }
125  }

Can anyone help with this?

Thanks,

Paul


-- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: