auth:mysql_e107
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
auth:mysql_e107 [2009-06-24 23:00] – added last UNION part for better integration with e107 84.168.142.67 | auth:mysql_e107 [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== e107 ====== | ||
- | User authentication with [[http:// | ||
- | |||
- | Tested on | ||
- | * e107 0.7.8 | ||
- | * Dokuwiki 2007-06-26b | ||
- | * MySQL 4.1.15 and MySQL 5.0.45 | ||
- | * php 4.3.11 and php 5.1.6 | ||
- | |||
- | This assumes that all user accounts will be created and maintained through e107. | ||
- | |||
- | Remember: First configure DokuWiki to use MySQL as [[: | ||
- | |||
- | Optionally, change the table prefix in the queries below (I have used the e107 default " | ||
- | |||
- | <code php> | ||
- | $conf[' | ||
- | array(" | ||
- | |||
- | $conf[' | ||
- | " | ||
- | FROM e107_user | ||
- | WHERE user_loginname=' | ||
- | |||
- | $conf[' | ||
- | " | ||
- | FROM e107_user | ||
- | WHERE user_loginname=' | ||
- | |||
- | $conf[' | ||
- | " | ||
- | FROM e107_user, e107_userclass_classes | ||
- | WHERE FIND_IN_SET(e107_userclass_classes.userclass_id, | ||
- | AND e107_user.user_loginname=' | ||
- | UNION | ||
- | SELECT ' | ||
- | FROM e107_user AS u | ||
- | WHERE user_admin <> 0 | ||
- | AND user_loginname=' | ||
- | UNION | ||
- | SELECT ' | ||
- | |||
- | </ | ||
- | |||
- | ===== Notes ===== | ||
- | |||
- | * The getGroups query is slightly particular. It consists of two SELECT statements, joined with a UNION statement. The first select finds all the userclasses the user belongs to in e107. It returns a list with these userclasses as groups to be used in DokuWiki. The second SELECT will add one more group (" | ||
- | * The last part of the UNION guarantees that every user with a valid login will land in the default group " | ||
- | * The first SELECT statement uses an unusual FIND_IN_SET WHERE clause. This is because e107 doesn' | ||
- | * Probably more of a general remark, but I'll put it here anyway because I came across it in my experiments: | ||
- | |||
- | --- // |
auth/mysql_e107.1245877204.txt.gz · Last modified: 2009-06-24 23:00 by 84.168.142.67