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


PHP UserAccount::isUserInActive方法代码示例

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


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

示例1: processPost

 function processPost($formvalues)
 {
     $session = SessionWrapper::getInstance();
     // debugMessage($formvalues);
     // trim spaces from the name field
     if (!isArrayKeyAnEmptyString('c_username', $formvalues)) {
         $formvalues['username'] = $formvalues['c_username'];
     }
     if (isArrayKeyAnEmptyString('status', $formvalues)) {
         unset($formvalues['status']);
     }
     if (isArrayKeyAnEmptyString('defaultdepartmentid', $formvalues)) {
         unset($formvalues['defaultdepartmentid']);
     }
     if (isArrayKeyAnEmptyString('defaultuserid', $formvalues)) {
         unset($formvalues['defaultuserid']);
     }
     if (!isArrayKeyAnEmptyString('workingdaysids', $formvalues)) {
         $formvalues['workingdays'] = implode(',', $formvalues['workingdaysids']);
     } else {
         if (!isArrayKeyAnEmptyString('workingdays_old', $formvalues)) {
             if (isArrayKeyAnEmptyString('workingdaysids', $formvalues)) {
                 $formvalues['workingdays'] = NULL;
             }
         } else {
             unset($formvalues['workingdays']);
         }
     }
     if (isArrayKeyAnEmptyString('isinvited', $formvalues)) {
         $formvalues['isinvited'] = NULL;
     }
     if (isArrayKeyAnEmptyString('hasacceptedinvite', $formvalues)) {
         $formvalues['hasacceptedinvite'] = NULL;
     }
     if (isArrayKeyAnEmptyString('dateinvited', $formvalues)) {
         unset($formvalues['dateinvited']);
     }
     if (isArrayKeyAnEmptyString('id', $formvalues)) {
         $formvalues['startdate'] = DEFAULT_DATETIME;
     }
     if (!isArrayKeyAnEmptyString('sendinvite', $formvalues)) {
         if ($formvalues['sendinvite'] == 1) {
             $this->setIsBeingInvited(1);
             $formvalues['isinvited'] = 1;
             $formvalues['invitedbyid'] = $session->getVar('userid');
             $formvalues['dateinvited'] = DEFAULT_DATETIME;
             $formvalues['hasacceptedinvite'] = 0;
         }
     }
     $updateuser = false;
     if (!isArrayKeyAnEmptyString('defaultuserid', $formvalues)) {
         $user = new UserAccount();
         $user->populate($formvalues['defaultuserid']);
         if ($user->isUserInActive()) {
             $updateuser = true;
             $formvalues['defaultuser']['id'] = $formvalues['defaultuserid'];
         }
     } else {
         $updateuser = true;
         $formvalues['defaultuser']['status'] = 0;
         $formvalues['defaultuser']['datecreated'] = date('Y-m-d', time());
         $formvalues['defaultuser']['createdby'] = $session->getVar('userid');
         $formvalues['defaultuser']['usergroups'][0]["groupid"] = 3;
         $formvalues['defaultuser']['type'] = 3;
     }
     if ($updateuser) {
         $names = explode(' ', $this->getContactPerson());
         debugMessage($names);
         $formvalues['defaultuser']['firstname'] = $names[0];
         if (!isArrayKeyAnEmptyString(1, $names)) {
             $formvalues['defaultuser']['lastname'] = $names[1];
         } else {
             $formvalues['defaultuser']['lastname'] = '.';
         }
         if (!isArrayKeyAnEmptyString(2, $names)) {
             $formvalues['defaultuser']['othername'] = $names[2];
         }
         $formvalues['defaultuser']['email'] = $this->getEmail();
         if ($this->getIsBeinginvited() == '1') {
             $formvalues['defaultuser']['hasacceptedinvite'] = 0;
             $formvalues['defaultuser']['dateinvited'] = date('Y-m-d', time());
             $formvalues['defaultuser']['invitedbyid'] = $session->getVar('userid');
             $formvalues['defaultuser']['isinvited'] = 1;
         }
     }
     if (isArrayKeyAnEmptyString('openinghour', $formvalues)) {
         unset($formvalues['openinghour']);
     } else {
         $formvalues['openinghour'] = date("H:i:s", strtotime($formvalues['openinghour']));
     }
     if (isArrayKeyAnEmptyString('closinghour', $formvalues)) {
         unset($formvalues['closinghour']);
     } else {
         $formvalues['closinghour'] = date("H:i:s", strtotime($formvalues['closinghour']));
     }
     if (isArrayKeyAnEmptyString('yearstart', $formvalues)) {
         unset($formvalues['yearstart']);
     } else {
         $formvalues['yearstart'] = date('Y-m-d', strtotime($formvalues['yearstart']));
     }
//.........这里部分代码省略.........
开发者ID:7thZoneTechnology,项目名称:hrms-1,代码行数:101,代码来源:Company.php


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