当前位置: 首页>>代码示例>>PHP>>正文


PHP Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser方法代码示例

本文整理汇总了PHP中Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser方法的具体用法?PHP Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser怎么用?PHP Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Vtiger_Util_Helper的用法示例。


在下文中一共展示了Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

    /** Function to save the user information into the database
     * @param $module -- module name:: Type varchar
     *
     */
    function save($module_name) {
        global $log, $adb;
        //Save entity being called with the modulename as parameter
        $this->saveentity($module_name);

        // Added for Reminder Popup support
        $query_prev_interval = $adb->pquery("SELECT reminder_interval from vtiger_users where id=?",
                array($this->id));
        $prev_reminder_interval = $adb->query_result($query_prev_interval,0,'reminder_interval');

        //$focus->imagename = $image_upload_array['imagename'];
        $this->saveHomeStuffOrder($this->id);
        SaveTagCloudView($this->id);

        // Added for Reminder Popup support
        $this->resetReminderInterval($prev_reminder_interval);
        //Creating the Privileges Flat File
        if(isset($this->column_fields['roleid'])) {
            updateUser2RoleMapping($this->column_fields['roleid'],$this->id);
        }

		//After adding new user, set the default activity types for new user
		Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser($this->id);

        require_once('modules/Users/CreateUserPrivilegeFile.php');
        createUserPrivilegesfile($this->id);
        createUserSharingPrivilegesfile($this->id);

    }
开发者ID:Wasage,项目名称:werpa,代码行数:33,代码来源:Users.php

示例2: save

 /** Function to save the user information into the database
  * @param $module -- module name:: Type varchar
  *
  */
 function save($module_name)
 {
     $adb = PearDatabase::getInstance();
     $log = vglobal('log');
     //Event triggering code
     require_once "include/events/include.inc";
     //In Bulk mode stop triggering events
     if (!self::isBulkSaveMode()) {
         $em = new VTEventsManager($adb);
         // Initialize Event trigger cache
         $em->initTriggerCache();
         $entityData = VTEntityData::fromCRMEntity($this);
         $em->triggerEvent("vtiger.entity.beforesave.modifiable", $entityData);
         $em->triggerEvent("vtiger.entity.beforesave", $entityData);
         $em->triggerEvent("vtiger.entity.beforesave.final", $entityData);
     }
     if ($this->mode != 'edit') {
         $sql = 'SELECT id FROM vtiger_users WHERE user_name = ? OR email1 = ?';
         $result = $adb->pquery($sql, array($this->column_fields['user_name'], $this->column_fields['email1']));
         if ($adb->num_rows($result) > 0) {
             Vtiger_Functions::throwNewException('LBL_USER_EXISTS');
             throw new WebServiceException(WebServiceErrorCode::$DATABASEQUERYERROR, vtws_getWebserviceTranslatedString('LBL_USER_EXISTS'));
             return false;
         }
     } else {
         $query = 'SELECT `roleid` FROM `vtiger_user2role` WHERE `userid` = ? LIMIT 1;';
         $oldRoleResult = $adb->pquery($query, [$this->id]);
         $oldRole = $adb->query_result($oldRoleResult, 0, 'roleid');
         if ($oldRole != $this->column_fields['roleid']) {
             $query = 'DELETE FROM `vtiger_module_dashboard_widgets` WHERE `userid` = ?;';
             $adb->pquery($query, [$this->id]);
         }
     }
     //Save entity being called with the modulename as parameter
     $this->saveentity($module_name);
     if ($em) {
         //Event triggering code
         $em->triggerEvent("vtiger.entity.aftersave", $entityData);
         $em->triggerEvent("vtiger.entity.aftersave.final", $entityData);
         //Event triggering code ends
     }
     // Added for Reminder Popup support
     $query_prev_interval = $adb->pquery("SELECT reminder_interval from vtiger_users where id=?", array($this->id));
     $prev_reminder_interval = $adb->query_result($query_prev_interval, 0, 'reminder_interval');
     //$focus->imagename = $image_upload_array['imagename'];
     $this->saveHomeStuffOrder($this->id);
     SaveTagCloudView($this->id);
     // Added for Reminder Popup support
     $this->resetReminderInterval($prev_reminder_interval);
     //Creating the Privileges Flat File
     if (isset($this->column_fields['roleid'])) {
         updateUser2RoleMapping($this->column_fields['roleid'], $this->id);
     }
     //After adding new user, set the default activity types for new user
     Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser($this->id);
     require_once 'modules/Users/CreateUserPrivilegeFile.php';
     createUserPrivilegesfile($this->id);
     createUserSharingPrivilegesfile($this->id);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:63,代码来源:Users.php

示例3: save

 /** Function to save the user information into the database
  * @param $module -- module name:: Type varchar
  *
  */
 function save($module_name)
 {
     $adb = PearDatabase::getInstance();
     $log = vglobal('log');
     if ($this->mode != 'edit') {
         $sql = 'SELECT id FROM vtiger_users WHERE user_name = ? OR email1 = ?';
         $result = $adb->pquery($sql, array($this->column_fields['user_name'], $this->column_fields['email1']));
         if ($adb->num_rows($result) > 0) {
             Vtiger_Functions::throwNewException('LBL_USER_EXISTS');
             throw new WebServiceException(WebServiceErrorCode::$DATABASEQUERYERROR, vtws_getWebserviceTranslatedString('LBL_USER_EXISTS'));
             return false;
         }
     }
     //Save entity being called with the modulename as parameter
     $this->saveentity($module_name);
     // Added for Reminder Popup support
     $query_prev_interval = $adb->pquery("SELECT reminder_interval from vtiger_users where id=?", array($this->id));
     $prev_reminder_interval = $adb->query_result($query_prev_interval, 0, 'reminder_interval');
     //$focus->imagename = $image_upload_array['imagename'];
     $this->saveHomeStuffOrder($this->id);
     SaveTagCloudView($this->id);
     // Added for Reminder Popup support
     $this->resetReminderInterval($prev_reminder_interval);
     //Creating the Privileges Flat File
     if (isset($this->column_fields['roleid'])) {
         updateUser2RoleMapping($this->column_fields['roleid'], $this->id);
     }
     //After adding new user, set the default activity types for new user
     Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser($this->id);
     require_once 'modules/Users/CreateUserPrivilegeFile.php';
     createUserPrivilegesfile($this->id);
     createUserSharingPrivilegesfile($this->id);
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:37,代码来源:Users.php


注:本文中的Vtiger_Util_Helper::setCalendarDefaultActivityTypesForUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。