[Wiki] changed: SQLAuthHowTo

Wiki Guest <[email protected]>
Newsgroups gmane.comp.horde.cvs
Message-ID <[email protected]>
guest [128.83.155.230]  Tue, 16 Sep 2008 18:28:58 -0400

Modified page: http://wiki.horde.org/SQLAuthHowTo
New Revision:  1.14
Change log:  fix home field and comments about it

@@ -45,9 +45,9 @@
  If you are not using domains, then use the following queries:

  * For query_auth, enter: {{SELECT * FROM users WHERE userid = \L AND  
password = MD5(\P);}}
  * For query_add, enter: {{INSERT INTO users (userid,password,home)  
VALUES (\L, MD5(\P), '/home/\L');}}
->> //NB: You may need to change the "home" value to point to their  
home directory or file space
+>>NB: You may need to change the "home" value to point to their home  
directory or file space
  * For query_getpw, enter: {{SELECT password FROM users WHERE userid = \L;}}
  * For query_update, enter: {{UPDATE users SET userid = \L WHERE  
userid = \O) LIMIT 1;}}
  * For query_resetpassword, enter: {{UPDATE users SET password =  
MD5(\P) WHERE userid = \L;}}
  * For query_remove, enter: {{DELETE FROM users WHERE userid = \L;}}
@@ -56,9 +56,10 @@

  If you are using domains, then use the following queries:

  * For query_auth, enter: {{SELECT * FROM users WHERE userid =  
SUBSTRING_INDEX(\L, '@', 1) AND domain = SUBSTRING_INDEX(\L, '@', -1)  
AND password = MD5(\P);}}
-* For query_add, enter: {{INSERT INTO users (domain,userid,password)  
VALUES ( SUBSTRING_INDEX(\L, '@', -1), SUBSTRING_INDEX(\L, '@', 1),  
MD5(\P));}}
+* For query_add, enter: {{INSERT INTO users  
(domain,userid,password,home) VALUES ( SUBSTRING_INDEX(\L, '@', -1),  
SUBSTRING_INDEX(\L, '@', 1), MD5(\P), '/home/\L');}}
+>>NB: You may need to change the "home" value to point to their home  
directory or file space
  * For query_getpw, enter: {{SELECT password FROM users WHERE userid  
= SUBSTRING_INDEX(\L, '@', 1) AND domain = SUBSTRING_INDEX(\L, '@',  
-1);}}
  * For query_update, enter: {{UPDATE users SET userid =  
SUBSTRING_INDEX(\L, '@', 1) AND domain = SUBSTRING_INDEX(\L, '@', -1)  
WHERE userid = SUBSTRING_INDEX(\O, '@', 1) AND domain =  
SUBSTRING_INDEX(\O, '@', -1);}}
  * For query_resetpassword, enter: {{UPDATE users SET password =  
MD5(\P) WHERE userid = SUBSTRING_INDEX(\L, '@', 1) AND domain =  
SUBSTRING_INDEX(\L, '@', -1);}}
  * For query_remove, enter: {{DELETE FROM users WHERE userid =  
SUBSTRING_INDEX(\L, '@', 1) AND domain = SUBSTRING_INDEX(\L, '@', -1);}}

--
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.