db_prefs.php
This contains functions for manipulating user preferences stored in a database, accessed through the Pear DB layer or PDO, the latter taking precedence if available.
Database:
The preferences table should have three columns: user char \ primary prefkey char / key prefval blob
CREATE TABLE userprefs (user CHAR(128) NOT NULL DEFAULT '', prefkey CHAR(64) NOT NULL DEFAULT '', prefval BLOB NOT NULL DEFAULT '', primary key (user,prefkey));
Configuration of databasename, username and password is done by using conf.pl or the administrator plugin
Three settings that control PDO behavior can be specified in config/config_local.php if needed: boolean $disable_pdo SquirrelMail uses PDO by default to access the user preferences and address book databases, but setting this to TRUE will cause SquirrelMail to fall back to using Pear DB instead. boolean $pdo_show_sql_errors When database errors are encountered, setting this to TRUE causes the actual database error to be displayed, otherwise generic errors are displayed, preventing internal database information from being exposed. This should be enabled only for debugging purposes. string $pdo_identifier_quote_char By default, SquirrelMail will quote table and field names in database queries with what it thinks is the appropriate quote character for the database type being used (backtick for MySQL (and thus MariaDB), double quotes for all others), but you can override the character used by putting it here, or tell SquirrelMail NOT to quote identifiers by setting this to "none"
Class | Description |
---|---|
dbPrefs | Class used to handle connections to prefs database and operations with preferences |
Needs either PDO or the DB functions Don't display errors here. (no code execution in functions/*.php).
will handle error in dbPrefs class.
Documentation generated on Mon, 13 Jan 2020 04:22:17 +0100 by phpDocumentor 1.4.3