Compatible with DokuWiki
Hrun, Detritus, Frusterick Manners, Elenor of Tsort
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to authdrupal8
Note: Wrong use of some settings can make your wiki unreachable. Be sure to read the full documentation before installing/activating the plugin.
External requirements: This plugin requires the following additional components that must be installed separately:
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
When using the plugin Dokuwiki will get the user and login information from a Drupal 7 database.
Users can login using their Drupal 7 login credentials. Registering and modifying users is not possible (and most likely will not be) as this functionality is provided by Drupal.
Dokuwiki will read user groups and memberships from the Drupal 7 database as well. Make sure you read the configuration instructions further below on this page.
After installation and activation the plugin can be configured using the dokuwiki configuration page. Make sure you stick to the suggested order unless you know exactly what you do.
You will find an authdrupal7-section on your config page. Edit the following values:
localhost
mypre_
, make sure it ends with an underscore/
You have the possibility to change the SQL statements retrieving needed information. For most Drupal installations the default statements should work fine.
Dokuwiki will use the Drupal roles as usergroups. To get the correct permissions for your users you have to edit the ACL settings.
When granting permissions the user group names are replaced with Drupal role names. If you want to grant access to all Drupal users that are members of the role wiki
use the user group name @wiki
.
Go to the authentication section of the configuration page.
@administrator
. I highly recommend that you are part of this group as this will be necessary to access the administration section afterwards. I highly recommend to keep @admin
as well, so you can easily switch back to authplain
. authdrupal7
.I highly recommend that you create new Drupal roles for use in your Dokuwiki permissions. Doing this you will be able to grant or deny wiki permissions without affecting your drupal permission. Not neccessarily should every Drupal admin have superuser rights in Dokuwiki. Create and assign this roles using Drupal administration tools.
SQL statement for retrieving the password hash for a given user for downstream comparison.
SELECT pass FROM %{drupal_prefix}users WHERE name=\'%{user}\'
It is mandatory that the returned hash comes in a field named pass
.
SQL statement to retrieve information about a given user.
SELECT name, mail FROM %{drupal_prefix}users WHERE name=\'%{user}\'
It is mandatory that the returned values come in fields named name
and mail
.
SQL statement to retrieve a given users role memberships.
SELECT roles.name FROM %{drupal_prefix}users users INNER JOIN %{drupal_prefix}users_roles userroles INNER JOIN %{drupal_prefix}role roles WHERE users.uid = userroles.uid AND roles.rid = userroles.rid AND users.name = \'%{user}\'
It is mandatory that the returned values come in a field named name
.
SQL statement to retrieve the number of non-deactivated user accounts.
SELECT COUNT(*) AS num FROM %{drupal_prefix}users WHERE status = 1
It is mandatory that the returned value comes in a field named num
.
The authdrupal7
plugin widely bases on the authmysql plugin by Andreas Gohr.
Some changes were neccessary as Drupal uses some algorithms for hashing passwords that were not realizable using the authmysql plugin. The plugin includes these methods from the Drupal 7 installation.
Compatibility with PHP7 is proposed in pull-request https://github.com/matzekuh/authdrupal7/pull/5 by user miroj