plugin:authdrupal7
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:authdrupal7 [2015-07-29 18:19] – [Configuration and Settings] 95.114.123.46 | plugin:authdrupal7 [2020-01-26 17:00] (current) – [Discussion] miroj | ||
---|---|---|---|
Line 7: | Line 7: | ||
type : auth | type : auth | ||
lastupdate : 2015-07-29 | lastupdate : 2015-07-29 | ||
- | compatible : Hrun | + | compatible : Hrun, Detritus, Frusterick Manners, Elenor of Tsort |
depends | depends | ||
conflicts | conflicts | ||
Line 28: | Line 28: | ||
* [[https:// | * [[https:// | ||
- | Install | + | Search and install |
===== Usage ===== | ===== Usage ===== | ||
Line 35: | Line 35: | ||
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.\\ | 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 shure you read the configuration instructions further below on this page. | + | 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. |
===== Configuration and Settings ===== | ===== Configuration and Settings ===== | ||
- | After installation and activation the plugin can be configured using the dokuwiki configuration page. Make shure you stick to the suggested order unless you know exactly what you do. | + | 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. |
=== 1. Plugin configuration === | === 1. Plugin configuration === | ||
Line 48: | Line 48: | ||
* database: //name of the drupal database on your mysql-server// | * database: //name of the drupal database on your mysql-server// | ||
* charset: //charset of the mysql-database// | * charset: //charset of the mysql-database// | ||
- | * drupalPrefix: | + | * drupalPrefix: |
- | * drupalRoot: //Path to your Drupal installation, | + | * drupalRoot: //Path to your Drupal installation, |
You have the possibility to change the SQL statements retrieving needed information. For most Drupal installations the default statements should work fine. | You have the possibility to change the SQL statements retrieving needed information. For most Drupal installations the default statements should work fine. | ||
Line 56: | Line 56: | ||
Dokuwiki will use the Drupal roles as usergroups. To get the correct permissions for your users you have to edit the ACL settings. | 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 '' | + | 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 '' |
=== 3. Authentication === | === 3. Authentication === | ||
Go to the authentication section of the configuration page. | Go to the authentication section of the configuration page. | ||
- | * Add at least one valid Drupal role or Drupal username to the superuser list e.g. '' | + | * Add at least one valid Drupal role or Drupal username to the superuser list e.g. '' |
* You might add valid Drupal roles/ | * You might add valid Drupal roles/ | ||
* __Afterwards__ set the authentication method to '' | * __Afterwards__ set the authentication method to '' | ||
Line 66: | Line 66: | ||
==== About Drupal roles ==== | ==== About Drupal roles ==== | ||
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. | 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. | ||
+ | |||
+ | ===== Configuration details ===== | ||
+ | |||
+ | ==== SQL statements (defaults) ==== | ||
+ | |||
+ | === checkPass === | ||
+ | SQL statement for retrieving the password hash for a given user for downstream comparison. | ||
+ | <code mysql> | ||
+ | SELECT pass FROM %{drupal_prefix}users WHERE name=\' | ||
+ | </ | ||
+ | It is mandatory that the returned hash comes in a field named '' | ||
+ | |||
+ | === getUserInfo === | ||
+ | SQL statement to retrieve information about a given user. | ||
+ | <code mysql> | ||
+ | SELECT name, mail FROM %{drupal_prefix}users WHERE name=\' | ||
+ | </ | ||
+ | It is mandatory that the returned values come in fields named '' | ||
+ | |||
+ | === getGroups === | ||
+ | SQL statement to retrieve a given users role memberships. | ||
+ | <code mysql> | ||
+ | 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 = \' | ||
+ | </ | ||
+ | It is mandatory that the returned values come in a field named '' | ||
+ | |||
+ | === getUserCount === | ||
+ | SQL statement to retrieve the number of non-deactivated user accounts. | ||
+ | <code mysql> | ||
+ | SELECT COUNT(*) AS num FROM %{drupal_prefix}users WHERE status = 1 | ||
+ | </ | ||
+ | It is mandatory that the returned value comes in a field named '' | ||
===== Development ===== | ===== Development ===== | ||
Line 83: | Line 115: | ||
===== Discussion ===== | ===== Discussion ===== | ||
- | + | Compatibility with PHP7 is proposed in pull-request https:// |
plugin/authdrupal7.1438186775.txt.gz · Last modified: 2015-07-29 18:19 by 95.114.123.46