* PRIMARY KEY (owner,nickname)
* </pre>
*
- * @copyright 1999-2011 The SquirrelMail Project Team
+ * @copyright 1999-2014 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
$escape = 'ESCAPE \'' . $this->dbh->quoteString('\\') . '\'';
$query = sprintf("SELECT * FROM %s WHERE owner='%s' AND " .
- "(LOWER(firstname) LIKE '%s' %s OR LOWER(lastname) LIKE '%s' %s)",
- $this->table, $this->owner, $expr, $escape, $expr, $escape);
+ "(LOWER(firstname) LIKE '%s' %s " .
+ "OR LOWER(lastname) LIKE '%s' %s " .
+ "OR LOWER(email) LIKE '%s' %s " .
+ "OR LOWER(nickname) LIKE '%s' %s)",
+ $this->table, $this->owner, $expr, $escape, $expr, $escape,
+ $expr, $escape, $expr, $escape);
$res = $this->dbh->query($query);