本文整理汇总了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.'));
}
示例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();
}
示例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;
}