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


PHP CUser::loadFull方法代码示例

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


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

示例1: notifyOwner

 public function notifyOwner($isNotNew)
 {
     global $AppUI, $w2Pconfig, $locale_char_set;
     $mail = new w2p_Utilities_Mail();
     if (intval($isNotNew)) {
         $mail->Subject("Project Updated: {$this->project_name} ", $locale_char_set);
     } else {
         $mail->Subject("Project Submitted: {$this->project_name} ", $locale_char_set);
     }
     $user = new CUser();
     $user->loadFull($this->project_owner);
     if ($user && $mail->ValidEmail($user->user_email)) {
         if (intval($isNotNew)) {
             $body = $AppUI->_('Project') . ": {$this->project_name} Has Been Updated Via Project Manager. You can view the Project by clicking: ";
         } else {
             $body = $AppUI->_('Project') . ": {$this->project_name} Has Been Submitted Via Project Manager. You can view the Project by clicking: ";
         }
         $body .= "\n" . $AppUI->_('URL') . ':     ' . w2PgetConfig('base_url') . '/index.php?m=projects&a=view&project_id=' . $this->project_id;
         $body .= "\n\n(You are receiving this email because you are the owner to this project)";
         $body .= "\n\n" . $AppUI->_('Description') . ':' . "\n{$this->project_description}";
         if (intval($isNotNew)) {
             $body .= "\n\n" . $AppUI->_('Updater') . ': ' . $AppUI->user_first_name . ' ' . $AppUI->user_last_name;
         } else {
             $body .= "\n\n" . $AppUI->_('Creator') . ': ' . $AppUI->user_first_name . ' ' . $AppUI->user_last_name;
         }
         if ($this->_message == 'deleted') {
             $body .= "\n\nProject " . $this->project_name . ' was ' . $this->_message . ' by ' . $AppUI->user_first_name . ' ' . $AppUI->user_last_name;
         }
         $mail->Body($body, isset($GLOBALS['locale_char_set']) ? $GLOBALS['locale_char_set'] : '');
         $mail->To($user->user_email, true);
         $mail->Send();
     }
 }
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:33,代码来源:projects.class.php

示例2: unset

    $AppUI->setState('UsrProjIdxDepartment', $_POST['department']);
    //if department is set, ignore the company_id field
    unset($company_id);
}
$department = $AppUI->getState('UsrProjIdxDepartment') !== null ? $AppUI->getState('UsrProjIdxDepartment') : $company_prefix . $AppUI->user_company;
//if $department contains the $company_prefix string that it's requesting a company and not a department.  So, clear the
// $department variable, and populate the $company_id variable.
if (!(strpos($department, $company_prefix) === false)) {
    $company_id = substr($department, strlen($company_prefix));
    $AppUI->setState('UsrProjIdxCompany', $company_id);
    unset($department);
}
$tab = $AppUI->processIntState('UserVwTab', $_GET, 'tab', 0);
// pull data
$user = new CUser();
$user->loadFull($user_id);
$contact = new CContact();
$contact->contact_id = $user->user_contact;
$methods = $contact->getContactMethods();
$methodLabels = w2PgetSysVal('ContactMethods');
if (!$user) {
    $titleBlock = new CTitleBlock('Invalid User ID', 'helix-setup-user.png', $m, "{$m}.{$a}");
    $titleBlock->addCrumb('?m=admin', 'users list');
    $titleBlock->show();
} else {
    $countries = w2PgetSysVal('GlobalCountries');
    // setup the title block
    $titleBlock = new CTitleBlock('View User', 'helix-setup-user.png', $m, "{$m}.{$a}");
    if ($canRead) {
        $titleBlock->addCrumb('?m=admin', 'users list');
    }
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:viewuser.php

示例3: arrayMerge

foreach ($roles as $role) {
    if ($role['name'] != 'Administrator') {
        $roles_arr[$role['id']] = $role['name'];
    } else {
        if ($perms->checkModuleItem('system', 'edit')) {
            $roles_arr[$role['id']] = $role['name'];
        }
    }
}
$roles_arr = arrayMerge(array(0 => ''), $roles_arr);
if ($contact_id) {
    $object = new CContact();
    $object->load($contact_id);
} else {
    $object = new CUser();
    $object->loadFull($object_id);
}
// pull companies
$company = new CCompany();
$companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$companies = arrayMerge(array('0' => ''), $companies);
// setup the title block
$ttl = $object_id ? 'Edit User' : 'Add User';
$titleBlock = new w2p_Theme_TitleBlock($ttl, 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
$titleBlock->addViewLink('user', $object_id);
$titleBlock->addViewLink('contact', $object->contact_id);
if ($object_id) {
    if ($canEdit || $object_id == $AppUI->user_id) {
        $titleBlock->addCrumb('?m=system&a=addeditpref&user_id=' . $object_id, 'edit preferences');
    }
开发者ID:victorrod,项目名称:web2project,代码行数:31,代码来源:addedit.php

示例4: notifyOwner

 public function notifyOwner($isNotNew)
 {
     $user = new CUser();
     $user->overrideDatabase($this->_query);
     $user->loadFull($this->project_owner);
     $subject = intval($isNotNew) ? $this->_AppUI->_('Project updated') . ': ' . $this->project_name : $this->_AppUI->_('Project submitted') . ': ' . $this->project_name;
     $emailManager = new w2p_Output_EmailManager($this->_AppUI);
     $body = $emailManager->getProjectNotify($this, $isNotNew);
     $mail = new w2p_Utilities_Mail();
     $mail->To($user->user_email, true);
     $mail->Subject($subject);
     $mail->Body($body, isset($GLOBALS['locale_char_set']) ? $GLOBALS['locale_char_set'] : '');
     $mail->Send();
 }
开发者ID:victorrod,项目名称:web2project,代码行数:14,代码来源:projects.class.php


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