本文整理汇总了PHP中Default_Model_Users::getUserDetails方法的典型用法代码示例。如果您正苦于以下问题:PHP Default_Model_Users::getUserDetails方法的具体用法?PHP Default_Model_Users::getUserDetails怎么用?PHP Default_Model_Users::getUserDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Default_Model_Users
的用法示例。
在下文中一共展示了Default_Model_Users::getUserDetails方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editAction
public function editAction()
{
$auth = Zend_Auth::getInstance();
$role_datap = array();
$empGroup = "";
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserRole = $auth->getStorage()->read()->emprole;
$loginuserGroup = $auth->getStorage()->read()->group_id;
$loginuserUnitID = $auth->getStorage()->read()->businessunit_id;
$loginuserDeptID = $auth->getStorage()->read()->department_id;
}
$id = (int) $this->getRequest()->getParam('id');
$id = abs($id);
if ($id == '') {
$id = $loginUserId;
}
$callval = $this->getRequest()->getParam('call');
if ($callval == 'ajaxcall') {
$this->_helper->layout->disableLayout();
}
$employeeform = new Default_Form_Myteamemployee();
try {
if ($id != '' && is_numeric($id) && $id > 0 && $id != $loginUserId) {
$employeeModal = new Default_Model_Employee();
$usersModel = new Default_Model_Users();
$employmentstatusModel = new Default_Model_Employmentstatus();
$busineesUnitModel = new Default_Model_Businessunits();
$deptModel = new Default_Model_Departments();
$role_model = new Default_Model_Roles();
$user_model = new Default_Model_Usermanagement();
$candidate_model = new Default_Model_Candidatedetails();
$jobtitlesModel = new Default_Model_Jobtitles();
$positionsmodel = new Default_Model_Positions();
$prefixModel = new Default_Model_Prefix();
$data = array();
$empDeptId = "";
$empRoleId = "";
$data = $employeeModal->getsingleEmployeeData($id);
if ($data == 'norows') {
$this->view->rowexist = "norows";
} else {
if (!empty($data)) {
$this->view->rowexist = "rows";
$employeeform->submit->setLabel('Update');
$data = $data[0];
/* Earlier code to fetch employee details */
$employeeData = $employeeModal->getsingleEmployeeData($id);
$roles_arr = $role_model->getRolesListByGroupID(EMPLOYEE_GROUP);
if (sizeof($roles_arr) > 0) {
$employeeform->emprole->addMultiOptions(array('' => 'Select Role') + $roles_arr);
}
$employmentStatusData = $employmentstatusModel->getempstatuslist();
if (sizeof($employmentStatusData) > 0) {
$employeeform->emp_status_id->addMultiOption('', 'Select Employment Status');
foreach ($employmentStatusData as $employmentStatusres) {
$employeeform->emp_status_id->addMultiOption($employmentStatusres['workcodename'], $employmentStatusres['statusname']);
}
}
$businessunitData = $busineesUnitModel->getDeparmentList();
if (sizeof($businessunitData) > 0) {
foreach ($businessunitData as $businessunitres) {
if ($businessunitres['id'] == $loginuserUnitID) {
$employeeform->businessunit_id->addMultiOption($businessunitres['id'], $businessunitres['unitname']);
}
}
}
$departmentsData = $deptModel->getDepartmentList($data['businessunit_id']);
if (sizeof($departmentsData) > 0) {
foreach ($departmentsData as $departmentsres) {
if ($departmentsres['id'] == $loginuserDeptID) {
$employeeform->department_id->addMultiOption($departmentsres['id'], $departmentsres['deptname']);
}
}
}
$jobtitleData = $jobtitlesModel->getJobTitleList();
if (sizeof($jobtitleData) > 0) {
$employeeform->jobtitle_id->addMultiOption('', 'Select Job Title');
foreach ($jobtitleData as $jobtitleres) {
$employeeform->jobtitle_id->addMultiOption($jobtitleres['id'], $jobtitleres['jobtitlename']);
}
}
$positionlistArr = $positionsmodel->getPositionList($data['jobtitle_id']);
if (sizeof($positionlistArr) > 0) {
$employeeform->position_id->addMultiOption('', 'Select Position');
foreach ($positionlistArr as $positionlistres) {
$employeeform->position_id->addMultiOption($positionlistres['id'], $positionlistres['positionname']);
}
}
$prefixData = $prefixModel->getPrefixList();
if (!empty($prefixData)) {
foreach ($prefixData as $prefixres) {
$employeeform->prefix_id->addMultiOption($prefixres['id'], $prefixres['prefix']);
}
}
$userData = $usersModel->getUserDetails($loginUserId);
if (count($userData) > 0) {
$employeeform->reporting_manager->addMultiOption($userData[0]['id'], $userData[0]['userfullname']);
}
$employeeform->populate($data);
//.........这里部分代码省略.........
示例2: save
//.........这里部分代码省略.........
$mngmntemailId = explode(",", constant('BG_CHECKS_MNGMNT_' . $bid));
} else {
$mngmntem = 'false';
$mngmntemailId = array();
}
if (defined('BG_CHECKS_HR_' . $bid) && $bid != '') {
$hremailId = explode(",", constant('BG_CHECKS_HR_' . $bid));
} else {
$hrem = 'false';
$hremailId = array();
}
$emailArr = array_merge($agencyemail1, $manager1, $mngmntemailId, $hremailId);
for ($i = 0; $i < sizeof($emailArr); $i++) {
$salutation = 'Dear Sir/Madam,';
if ($i == 0) {
$salutation = 'Dear ' . ucfirst($agencysalutationName) . ',';
$options['toName'] = ucfirst($agencysalutationName);
}
if ($i == 1) {
$salutation = 'Dear ' . ucfirst($lmanager1Name) . ',';
$options['toName'] = ucfirst($lmanager1Name);
}
if ($i == 2) {
$salutation = 'Dear Management,';
$options['toName'] = 'Management';
}
if ($i == 3) {
$salutation = 'Dear HR,';
$options['toName'] = 'HR';
}
$options['subject'] = APPLICATION_NAME . ' : Background checks re-opened';
$options['header'] = 'Background checks re-opened';
$options['toEmail'] = $emailArr[$i];
$createdbyName = $usermodel->getUserDetails($loginUserId);
if ($i == 0) {
$mailsentflag = 1;
$options['message'] = '<div>' . $salutation . '<div>The background check for ' . ucfirst($username) . '
has been re-opened by ' . $createdbyName[0]['userfullname'] . '. </div>
<div style="padding:20px 0 10px 0;">Please <a href="' . $baseUrl . '/index/popup" target="_blank" style="color:#b3512f;">click here</a> to login and check the details.</div>
</div>';
} else {
$options['message'] = '<div>' . $salutation . '<div>The background check for ' . ucfirst($username) . '
has been re-opened by ' . $createdbyName[0]['userfullname'] . '. </div>
<div style="padding:20px 0 10px 0;">Please <a href="' . $baseUrl . '/index/popup" target="_blank" style="color:#b3512f;">click here</a> to login and check the details.</div>
</div>';
}
$options['cron'] = 'yes';
sapp_Global::_sendEmail($options);
}
}
/* END */
}
/* END */
$data = array('specimen_id' => $specimen_id, 'flag' => $userflag, 'bgagency_id' => $agencyid, 'modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
if ($id != '') {
$data['process_status'] = $newStatus;
$data['explanation'] = NULL;
$where = array('id=?' => $id);
$actionflag = 2;
} else {
$data['process_status'] = $newStatus;
$data['bgagency_pocid'] = $radio_pocId;
$data['createdby'] = $loginUserId;
$data['createddate'] = gmdate("Y-m-d H:i:s");
$data['isactive'] = 1;
$where = '';
示例3: viewprofileAction
public function viewprofileAction()
{
$id = '';
$username = '';
$email = '';
$profileimage = '';
$role = '';
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$auth = $auth->getStorage()->read();
$id = $auth->id;
$login_user_role = $auth->emprole;
$username = $auth->userfullname;
$email = $auth->emailaddress;
}
if ($id == SUPERADMIN) {
$role = 'true';
}
$viewprofileform = new Default_Form_viewprofile();
$usermodel = new Default_Model_Users();
$getuserdetails = $usermodel->getUserDetails($id);
$username = $getuserdetails[0]['userfullname'];
$email = $getuserdetails[0]['emailaddress'];
$profileimage = $getuserdetails[0]['profileimg'];
$viewprofileform->populate($getuserdetails[0]);
$this->view->id = $id;
$this->view->username = $username;
$this->view->email = $email;
$this->view->profileimage = $profileimage;
$this->view->login_user_role = $login_user_role;
$this->view->role = $role;
$this->view->form = $viewprofileform;
$this->view->messages = $this->_helper->flashMessenger->getMessages();
if ($this->getRequest()->getPost()) {
$result = $this->saveProfileDetails($viewprofileform);
$this->view->msgarray = $result;
}
}
示例4: save
//.........这里部分代码省略.........
}
if (defined('BG_CHECKS_MNGMNT_' . $bid) && $bid != '') {
$mngmntemailId = explode(",", constant('BG_CHECKS_MNGMNT_' . $bid));
} else {
$mngmntemailId = array();
}
if (defined('BG_CHECKS_HR_' . $bid) && $bid != '') {
$hremailId = explode(",", constant('BG_CHECKS_HR_' . $bid));
} else {
$hremailId = array();
}
$emailArr = array_merge($manager1, $agencyemail1, $mngmntemailId, $hremailId);
for ($i = 0; $i < sizeof($emailArr); $i++) {
$salutation = 'Dear Sir/Madam,';
if ($i == 0) {
$salutation = 'Dear ' . ucfirst($lmanager1Name) . ',';
$options['toName'] = ucfirst($lmanager1Name);
} else {
if ($i == 1) {
$salutation = 'Dear ' . ucfirst($agencysalutationName) . ',';
$options['toName'] = ucfirst($agencysalutationName);
} else {
if ($i == 2) {
$salutation = 'Dear Management,';
$options['toName'] = 'Management';
} else {
if ($i == 3) {
$salutation = 'Dear HR,';
$options['toName'] = 'HR';
}
}
}
}
$createdbyName = $usermodel->getUserDetails($loginUserId);
$options['subject'] = APPLICATION_NAME . ' : Background check initiated';
$options['header'] = 'Background check initiated';
$options['toEmail'] = $emailArr[$i];
$options['message'] = '<div>' . $salutation . '<div>' . ucfirst($personalData[0]['name']) . ' has been sent for background check by ' . ucfirst($createdbyName[0]['userfullname']) . '.';
if (!empty($personalData[0]['employee_id'])) {
$options['message'] .= ' Please find the details below.</div>
<div>
<table border="1" style="border-collapse:collapse;">
<tr><td>Employee ID</td><td>' . $personalData[0]['employee_id'] . '</td></tr>
<tr><td>Employee Email</td><td>' . $personalData[0]['email_id'] . '</td></tr>
<tr><td>Employee Designation</td><td>' . $personalData[0]['designation'] . '</td></tr>
</table>
</div>';
}
$options['message'] .= '<div style="padding:20px 0 10px 0;">Please <a href="' . $baseUrl . '/index/popup" target="_blank" style="color:#b3512f;">click here</a> to login and check the details.</div>
</div>';
$options['cron'] = 'yes';
$result = sapp_Global::_sendEmail($options);
}
}
if ($id != '') {
for ($i = 0; $i < sizeof($agencyPOCData); $i++) {
if ($agencyPOCData[$i]['id'] == $radio_pocId) {
$agencyEmail = $agencyPOCData[$i]['email'];
$agencyfname = $agencyPOCData[$i]['first_name'];
$agencylname = $agencyPOCData[$i]['last_name'];
}
}
$data = array('modifiedby' => $loginUserId, 'modifieddate' => gmdate("Y-m-d H:i:s"));
$empArr = explode('-', $id);
$specimenId = $empArr[0];
$empFlag = $empArr[1];