protected function setInstanceSetting($name, $value, $accountUserId = null)
 {
     if ($accountUserId == null) {
         $accountUserId = Gpf_Session::getAuthUser()->getAccountUserId();
     }
     $attribute = new Gpf_Db_UserAttribute();
     $attribute->setName($name);
     $attribute->set(self::VALUE, $value);
     $attribute->setAccountUserId($accountUserId);
     $attribute->save();
 }
 private function setQuickLaunchSettings($accountUserId, $value) {
     $attribute = new Gpf_Db_UserAttribute();
     $attribute->setName('quickLaunchSetting');
     $attribute->set(Gpf_Db_Table_UserAttributes::VALUE, $value);
     $attribute->setAccountUserId($accountUserId);
     $attribute->save();
 }
 private static function setDefaultLanguageToAffiliate($accountUserId) {
     $attribute = new Gpf_Db_UserAttribute();
     $attribute->setName(Gpf_Auth_User::LANGUAGE_ATTRIBUTE_NAME);
     $attribute->setAccountUserId($accountUserId);
     try {
         $attribute->loadFromData(array(Gpf_Db_Table_UserAttributes::NAME, Gpf_Db_Table_UserAttributes::ACCOUNT_USER_ID));
         return;
     } catch (Gpf_DbEngine_NoRowException $e) {
         $attribute->set(Gpf_Db_Table_UserAttributes::VALUE, Gpf_Lang_Dictionary::getDefaultLanguage());
         $attribute->save();
     }
 }