DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:authdrupal7

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:authdrupal7 [2015-07-29 18:19] – [Configuration and Settings] 95.114.123.46plugin: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://www.drupal.org/|Drupal 7]]   * [[https://www.drupal.org/|Drupal 7]]
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ===== 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: //Prefix of your Drupal tables, e.g. ''mypre_'', make shure it ends with an underscore// +  * drupalPrefix: //Prefix of your Drupal tables, e.g. ''mypre_'', make sure it ends with an underscore// 
-  * drupalRoot: //Path to your Drupal installation, make shure it ends with an ''/''//+  * drupalRoot: //Path to your Drupal installation, make sure it ends with an ''/''//
  
 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 ''wiki'' user the user group name ''@wiki''.+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''.
  
 === 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. ''@administrator''. I highly recommend that you are part of this group as this will be necessary to access the administration section afterwards.+  * Add at least one valid Drupal role or Drupal username to the superuser list e.g. ''@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''
   * You might add valid Drupal roles/usernames to the managers list.   * You might add valid Drupal roles/usernames to the managers list.
   * __Afterwards__ set the authentication method to ''authdrupal7''.   * __Afterwards__ set the authentication method to ''authdrupal7''.
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=\'%{user}\'
 +</code>
 +It is mandatory that the returned hash comes in a field named ''pass''.
 +
 +=== getUserInfo ===
 +SQL statement to retrieve information about a given user.
 +<code mysql>
 +SELECT name, mail FROM %{drupal_prefix}users WHERE name=\'%{user}\'
 +</code>
 +It is mandatory that the returned values come in fields named ''name'' and ''mail''.
 +
 +=== 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 = \'%{user}\'
 +</code>
 +It is mandatory that the returned values come in a field named ''name''.
 +
 +=== 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
 +</code>
 +It is mandatory that the returned value comes in a field named ''num''.
  
 ===== Development ===== ===== Development =====
Line 83: Line 115:
 ===== Discussion ===== ===== Discussion =====
  
- +Compatibility with PHP7 is proposed in pull-request https://github.com/matzekuh/authdrupal7/pull/5 by user miroj
plugin/authdrupal7.1438186775.txt.gz · Last modified: 2015-07-29 18:19 by 95.114.123.46

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki