Class: UserSettings
Source Location: /blogs/inc/users/model/_usersettings.class.php
Class UserSettings
Class Overview
|
Class to handle the settings for users Located in /blogs/inc/users/model/_usersettings.class.php [line 47] AbstractSettings | --UserSettings |
[ Top ]
Inherited Properties, Constants, and Methods
| Inherited Properties | Inherited Methods | Inherited Constants |
|---|---|---|
|
Inherited From AbstractSettings |
Inherited From AbstractSettings
|
[ Top ]
Property Summary
Method Summary
| UserSettings | UserSettings() | Constructor |
| void | delete() | Mark a setting for deletion (dbupdate() writes it to DB). |
| void | get() | Get a setting from the DB user settings table |
| NULL|mixed | param_Request() | Get a param from Request and save it to UserSettings, or default to previously saved user setting. |
| void | set() | Temporarily sets a user setting (dbupdate() writes it to DB) |
[ Top ]
Properties
array
$_defaults
= array(
'action_icon_threshold' => 3,
'action_word_threshold' => 3,
'display_icon_legend' => 0,
'control_form_abortions' => 1,
'focus_on_first_input' => 0, // TODO: fix sideeffect when pressing F5
'pref_browse_tab' => 'full',
'pref_edit_tab' => 'simple',
'fm_imglistpreview' => 1,
'fm_showdate' => 'compact',
'fm_allowfiltering' => 'simple',
'blogperms_layout' => 'default', // selected view in blog (user/group) perms
'login_multiple_sessions' => 0, // disallow multiple concurrent sessions by default
'timeout_sessions' => NULL, // user session timeout (NULL means application default)
'results_per_page' => 20,
) [line 57]
'action_icon_threshold' => 3,
'action_word_threshold' => 3,
'display_icon_legend' => 0,
'control_form_abortions' => 1,
'focus_on_first_input' => 0, // TODO: fix sideeffect when pressing F5
'pref_browse_tab' => 'full',
'pref_edit_tab' => 'simple',
'fm_imglistpreview' => 1,
'fm_showdate' => 'compact',
'fm_allowfiltering' => 'simple',
'blogperms_layout' => 'default', // selected view in blog (user/group) perms
'login_multiple_sessions' => 0, // disallow multiple concurrent sessions by default
'timeout_sessions' => NULL, // user session timeout (NULL means application default)
'results_per_page' => 20,
) [line 57]
The default settings to use, when a setting is not given in the database.
API Tags:| Access: | protected |
Information Tags:
| Todo: | Allow overriding from /conf/_config_TEST.php? |
Redefinition of:
- AbstractSettings::$_defaults
- Default settings.
[ Top ]
Methods
delete [line 143]
|
Mark a setting for deletion (dbupdate() writes it to DB).
Parameters:| string | $setting: | name of setting |
| integer | $user_ID: | User ID (by default $current_User->ID will be used) |
Redefinition of:
- AbstractSettings::delete()
- Remove a setting.
[ Top ]
get [line 94]
|
Get a setting from the DB user settings table
Parameters:| string | $setting: | name of setting |
| integer | $user_ID: | User ID (by default $current_User->ID will be used) |
Redefinition of:
- AbstractSettings::get()
- Get a setting from the DB settings table.
[ Top ]
param_Request [line 187]
|
Get a param from Request and save it to UserSettings, or default to previously saved user setting.
If the user setting was not set before (and there's no default given that gets returned), $default gets used.
Parameters:| string | $param_name: | Request param name |
| string | $uset_name: | User setting name. Make sure this is unique! |
| string | $type: |
Force value type to one of:
|
| mixed | $default: | Default value or TRUE if user input required |
| boolean | $memorize: | Do we need to memorize this to regenerate the URL for this page? |
| boolean | $override: | Override if variable already set |
API Tags:
| Return: | NULL, if neither a param was given nor $UserSettings knows about it. |
Information Tags:
| Todo: | Move this to _abstractsettings.class.php - the other Settings object can also make use of it! |
Redefinition of:
- AbstractSettings::param_Request()
- Get a param from Request and save it to Settings, or default to previously saved user setting.
[ Top ]
set [line 119]
|
Temporarily sets a user setting (dbupdate() writes it to DB)
Parameters:| string | $setting: | name of setting |
| mixed | $value: | new value |
| integer | $user_ID: | User ID (by default $current_User->ID will be used) |
Redefinition of:
- AbstractSettings::set()
- Temporarily sets a setting (dbupdate() writes it to DB).
[ Top ]
