DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:authpdo:nextcloud

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:authpdo:nextcloud [2019-02-18 00:51] reinholdplugin:authpdo:nextcloud [2019-02-18 01:04] (current) reinhold
Line 24: Line 24:
 | plugin>authpdo>user   | <DB-USERNAME> | | plugin>authpdo>user   | <DB-USERNAME> |
 | plugin>authpdo>pass   | <DB-PASSWORD> | | plugin>authpdo>pass   | <DB-PASSWORD> |
-| plugin>authpdo>select-user   | SELECT uid AS user, SUBSTR(password,3) AS hash, displayname AS name, configvalue AS mail FROM oc_users LEFT JOIN oc_preferences ON oc_users.uid = oc_preferences.userid AND oc_preferences.appid = \'settings\' AND oc_preferences.configkey = \'email\' WHERE oc_users.uid +| plugin>authpdo>select-user   <code>SELECT 
-=:user | +    uid AS user, 
-| plugin>authpdo>select-user-groups   | SELECT gid AS \'group\' FROM oc_group_user WHERE uid=:user |+    SUBSTRING(password,3) AS hash, 
 +    displayname AS name, 
 +    configvalue AS mail 
 +FROM  
 +    oc_users LEFT JOIN oc_preferences  
 +ON 
 +    oc_users.uid = oc_preferences.userid AND 
 +    oc_preferences.appid = 'settings' AND 
 +    oc_preferences.configkey = 'email' 
 +WHERE 
 +    oc_users.uid = :user</code> 
 +| plugin>authpdo>select-user-groups   <code>SELECT gid AS 'group' FROM oc_group_user WHERE uid=:user</code> |
 | Other fields   | Leave empty | | Other fields   | Leave empty |
  
 Note: Make sure not to add quotes around :user, as the authpdo plugin will automatically wrap strings like the user id in quotes. Note: Make sure not to add quotes around :user, as the authpdo plugin will automatically wrap strings like the user id in quotes.
  
-Note2: Instead of using the same PostgreSQL user as Nextcloud, it might be advisable to create a new 'read-only' user as we will not be doing any writing to the Nextcloud database.+Note2: Instead of using the same database user as Nextcloud, it might be advisable to create a new 'read-only' user as we will not be doing any writing to the Nextcloud database.
  
 In the Authentication section: In the Authentication section:
plugin/authpdo/nextcloud.1550447515.txt.gz · Last modified: 2019-02-18 00:51 by reinhold

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