oUser->getId(), 'zohoWarning'); // Get user preference if(empty($aUserPreference) || is_null($aUserPreference)) { // Create the prefernce $oUserPreference = new UserPreferences( $this->oUser->getId(), 'zohoWarning', $sValue); DBUtil::startTransaction(); $oUserPreference->create(); DBUtil::commit(); } else { foreach ($aUserPreference as $oUserPreference) { // Access object if($oUserPreference->getValue() != $sValue) { // Update preference $oUserPreference->setValue($sValue); DBUtil::startTransaction(); $oUserPreference->update(); DBUtil::commit(); } } } } exit(); } public function do_setPreference($sKey, $sValue) { } } class adminManageUserPreferencesDispatcher extends ManageUserPreferencesDispatcher { var $bAdminRequired = true; var $sSection = 'administration'; function adminManageUserPreferencesDispatcher() { $this->aBreadcrumbs = array(array('action' => 'administration', 'name' => _kt('Administration')),); return parent::KTStandardDispatcher(); } } class manageUserPreferencesNavigationPortlet extends KTPortlet { var $bActive = true; function manageUserPreferencesNavigationPortlet($sTitle) { parent::KTPortlet($sTitle); } } ?>