當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。