From 75bfc19c4fec0d9ec349df05c30bbd95e459a5ba Mon Sep 17 00:00:00 2001 From: Matthias Grimm Date: Mon, 7 Nov 2005 22:07:40 +0100 Subject: MySQL auth module documentation This patch completes the documentation of the MySQL SQL statements that are necessary to run the mysql OO auth module in mysql.conf.php.example. Some pattern names in the code were not in line - fixed. darcs-hash:20051107210740-4145d-cdf140b6d14664ce9c1a85f67e1bf8feb294c17b.gz --- inc/auth/mysql.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc/auth/mysql.class.php') diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php index accb650eb..ff126a0ec 100644 --- a/inc/auth/mysql.class.php +++ b/inc/auth/mysql.class.php @@ -710,16 +710,16 @@ class auth_mysql extends auth_basic { $tmp = addslashes('%'.mysql_real_escape_string($pattern, $this->dbcon).'%'); if ($item == 'user') { if ($cnt++ > 0) $SQLfilter .= " AND "; - $SQLfilter .= str_replace('%s',$tmp,$this->cnf['FilterLogin']); + $SQLfilter .= str_replace('%u',$tmp,$this->cnf['FilterLogin']); } else if ($item == 'name') { if ($cnt++ > 0) $SQLfilter .= " AND "; - $SQLfilter .= str_replace('%s',$tmp,$this->cnf['FilterName']); + $SQLfilter .= str_replace('%n',$tmp,$this->cnf['FilterName']); } else if ($item == 'mail') { if ($cnt++ > 0) $SQLfilter .= " AND "; - $SQLfilter .= str_replace('%s',$tmp,$this->cnf['FilterEmail']); + $SQLfilter .= str_replace('%e',$tmp,$this->cnf['FilterEmail']); } else if ($item == 'grps') { if ($cnt++ > 0) $SQLfilter .= " AND "; - $SQLfilter .= str_replace('%s',$tmp,$this->cnf['FilterGroup']); + $SQLfilter .= str_replace('%g',$tmp,$this->cnf['FilterGroup']); } } -- cgit v1.2.3