Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Can't see Register button (using authPDO)
Avatar
sTeamTraen #1
Member since Sep 2009 · 20 posts
Group memberships: Members
Show profile · Link to this post
Subject: Can't see Register button (using authPDO)
I have set up authPDO authentication and can log in with an existing account. However, the "Register" link is not available, only "Log In".

I tried to simulate the effect of this button with the URL "doku.php?id=start&do=register". The error message is "Action disabled: register".

Some searching suggests that this message appears when the configuration explicitly excludes registration via "disableactions". However, this field is completely empty (i.e., nothing is disabled).

I'm guessing that the problem could be due to my authPDO configuration not containing a particular SQL string that would be necessary to add new users, but I'm not sure what that might be. Can someone confirm if this is a plausible explanation? Perhaps the code checks that a certain number of config elements are defined before it allows the Register link to be displayed. In that case I would maybe try to read the code to establish what that list of elements is. (This migration from authMySQL to authPDO is a bit of a pain...)

Thanks for any ideas!
Nick
Avatar
schplurtz (Moderator) #2
Member since Nov 2009 · 383 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
Hi,
I'm guessing that the problem could be due to my authPDO configuration not containing a particular SQL string that would be necessary to add new users
Correct ! Register action does not work unless the underlying auth plugin can add users. There is an explicit test in DokuWiki code.

, but I'm not sure what that might be.
Probably all the SQL statements mentionned in plugin:authpdo#additional_sql_setup. There is an example for each of them. That should help you to write the statements for your database schema.
  1. $conf['plugin']['authpdo']['select-groups'] = 'SELECT ... ';
  2. $conf['plugin']['authpdo']['insert-user'] = 'INSERT INTO .... VALUES( :user, :hash, :name, :mail)';
  3. // and so on
Avatar
sTeamTraen #3
Member since Sep 2009 · 20 posts
Group memberships: Members
Show profile · Link to this post
Yay, that worked! Hopefully I can now forget all about DokuWiki configuration for another few years. :D
Avatar
schplurtz (Moderator) #4
Member since Nov 2009 · 383 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
That's great !

Could you post here the relevant part or your database schema
and your current config ? That might help others someday.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-03-23, 22:18:03 (UTC +01:00)