- Enhancement (Trac#189) first version of a (simple) End-Users portal.

- Fix for the appUserPreferences class

SVN:trunk[806]
This commit is contained in:
Denis Flaven
2010-09-10 10:10:57 +00:00
parent 7312d977f3
commit 463e7b5413
11 changed files with 79 additions and 7 deletions

View File

@@ -125,14 +125,14 @@ class appUserPreferences extends DBObject
{
if (self::$oUserPrefs != null) return;
$oSearch = new DBObjectSearch('appUserPreferences');
$oSearch->AddCondition('userid', UserRights::GetUser(), '=');
$oSearch->AddCondition('userid', UserRights::GetUserId(), '=');
$oSet = new DBObjectSet($oSearch);
$oObj = $oSet->Fetch();
if ($oObj == null)
{
// No prefs (yet) for this user, create the object
$oObj = new appUserPreferences();
$oObj->Set('userid', UserRights::GetUser());
$oObj->Set('userid', UserRights::GetUserId());
$oObj->Set('preferences', array()); // Default preferences: an empty array
$oObj->DBInsert();
}