Exemple #1
0
 /**
  * saves userProfile config
  *
  * @param array $configData
  */
 public function setUserProfileConfig($configData)
 {
     Tinebase_UserProfile::getInstance()->setReadableFields($configData['readableFields']);
     Tinebase_UserProfile::getInstance()->setUpdateableFields($configData['updateableFields']);
 }
 /**
  * update profile portion of given contact
  * 
  * @param  Addressbook_Model_Contact $_userProfile
  * @return Addressbook_Model_Contact
  * 
  * @todo think about adding $_ignoreACL to generic update() to simplify this
  */
 public function updateUserProfile($_userProfile)
 {
     Tinebase_UserProfile::getInstance()->checkRight($_userProfile->account_id);
     $doContainerACLChecks = $this->doContainerACLChecks(FALSE);
     $contact = $this->getContactByUserId($_userProfile->account_id, true);
     // we need to unset the jpegphoto because update() expects the image data and we only have a boolean value here
     unset($contact->jpegphoto);
     $userProfile = Tinebase_UserProfile::getInstance()->mergeProfileInfo($contact, $_userProfile);
     $contact = $this->update($userProfile, FALSE);
     $userProfile = Tinebase_UserProfile::getInstance()->doProfileCleanup($contact);
     $this->doContainerACLChecks($doContainerACLChecks);
     return $userProfile;
 }