當前位置: 首頁>>代碼示例>>PHP>>正文


PHP User_Model::getFullName方法代碼示例

本文整理匯總了PHP中User_Model::getFullName方法的典型用法代碼示例。如果您正苦於以下問題:PHP User_Model::getFullName方法的具體用法?PHP User_Model::getFullName怎麽用?PHP User_Model::getFullName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在User_Model的用法示例。


在下文中一共展示了User_Model::getFullName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: authorizeFile

 public function authorizeFile($data)
 {
     if (is_array($data['files'])) {
         foreach ($data['files'] as $file) {
             $checkBox[] = array('id' => $file);
         }
     } else {
         $checkBox[] = array('id' => $data['files']);
     }
     $reviewerComments = 'To= ' . $data['form']['to'] . ';Subject= ' . $data['form']['subject'] . ' ;Comments= ' . $data['form']['comments'];
     $date = date('M-d-Y H:i');
     $getFullName = $this->userObj->getFullName();
     $fullName = $getFullName[0] . ' ' . $getFullName[1];
     $reviewerEmail = $this->userObj->getEmailAddress();
     $reviewerPhone = $this->userObj->getPhoneNumber();
     $reviewerDept = $this->userObj->getDeptName();
     if ($this->session->admin) {
         $idArray = $this->userObj->getAllRevieweeIds();
     } else {
         $idArray = $this->userObj->getRevieweeIds();
     }
     foreach ($checkBox as $key => $value) {
         // Check to make sure the current file_id is in their list of reviewable ID's
         if (in_array($value, $idArray)) {
             $fileId = $value['id'];
             $newFileObj = new Document_Model($fileId);
             $newUserObj = new User_Model($newFileObj->getOwner());
             $mailTo = $newUserObj->getEmailAddress();
             $userName = $newUserObj->getFullName();
             $userFullName = $userName[0] . ' ' . $userName[1];
             $deptId = $newFileObj->getDepartment();
             // Build email for author notification
             if (isset($data['form']['sendToUsers'][0]) && in_array('owner', $data['form']['sendToUsers'])) {
                 // Lets unset this now so the new array will just be user_id's
                 $data['form']['sendToUsers'] = array_slice($data['form']['sendToUsers'], 1);
                 $emailData = array('reviewer' => $fullName, 'title' => 'Author', 'fileName' => $newFileObj->getRealName(), 'status' => 'Authorized', 'date' => date('l \\t\\h\\e jS'), 'msg' => ' was accepted into the document repository.', 'email' => $reviewerEmail, 'siteName' => $this->config->item('site_name'), 'phoneNumber' => $reviewerPhone, 'department' => $reviewerDept, 'comments' => $data['form']['comments']);
                 $body = $this->load->view('emails/publish_file_email_view', $emailData, true);
                 $subject = $newFileObj->getRealName() . ' has been accepted by ' . $fullName;
                 $this->email->setFrom($reviewerEmail, $fullName);
                 $this->email->addAddress($mailTo, $userFullName);
                 $this->email->Subject = $subject;
                 $this->email->msgHTML($body);
                 $this->email->send();
             }
             $newFileObj->Publishable(1);
             $newFileObj->setReviewerComments($reviewerComments);
             AccessLog_Model::addLogEntry($fileId, 'Y');
         } else {
             echo json_encode(array('status' => 'error', 'msg' => 'You cannot alter this files status.'));
             exit;
         }
     }
     echo json_encode(array('status' => 'success', 'msg' => 'File Status successfully updated.'));
 }
開發者ID:brandon-bailey,項目名稱:osdms,代碼行數:54,代碼來源:Tobepublished_model.php

示例2: getOwnerFullName

 /**
  * return owner's full name in an array where index=0 corresponds to the last name
  * and index=1 corresponds to the first name
  * @return mixed
  */
 public function getOwnerFullName()
 {
     $userObj = new User_Model($this->owner);
     return $userObj->getFullName();
 }
開發者ID:brandon-bailey,項目名稱:osdms,代碼行數:10,代碼來源:Module_model.php

示例3: getReviewerName

 /**
  * return the username of the reviewer
  * @return bool
  */
 public function getReviewerName()
 {
     $reviewerId = $this->getReviewerID();
     if (isset($reviewerId)) {
         $userObj = new User_Model($reviewerId);
         return $userObj->getFullName();
     }
     return false;
 }
開發者ID:brandon-bailey,項目名稱:osdms,代碼行數:13,代碼來源:Document_model.php


注:本文中的User_Model::getFullName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。