X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fdb_prefs.php;h=fc64be502e565a0a52cd5d28e8e52ba8d3d3e920;hb=8747058aeaa16ece0107b756645abcb8f8a32b5b;hp=87990fddb2a7068c9f8b0860f7cffbb1b5235196;hpb=d4e46166df04792c6b939356ea5dfda8e47bba7b;p=squirrelmail.git diff --git a/functions/db_prefs.php b/functions/db_prefs.php index 87990fdd..fc64be50 100644 --- a/functions/db_prefs.php +++ b/functions/db_prefs.php @@ -21,7 +21,7 @@ * Configuration of databasename, username and password is done * by using conf.pl or the administrator plugin * - * @copyright © 1999-2009 The SquirrelMail Project Team + * @copyright 1999-2010 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -222,6 +222,14 @@ class dbPrefs { if (!empty($prefs_user_field)) { $this->user_field = $prefs_user_field; } + + // the default user field is "user", which in PostgreSQL + // is an identifier and causes errors if not escaped + // + if ($this->db_type == SMDB_PGSQL) { + $this->user_field = '"' . $this->user_field . '"'; + } + if (!empty($prefs_key_field)) { $this->key_field = $prefs_key_field; }