User Creation changes
This commit is contained in:
parent
ed905cafe4
commit
98b5faff90
@ -1,3 +1,8 @@
|
||||
|
||||
Currently editing:
|
||||
/home/kasiram9/public_html/sidd_uat/application/controllers/login.php
|
||||
Encoding: Reopen Switch to Code Editor Close Save
|
||||
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
@ -64,7 +69,7 @@ class Login extends CI_Controller
|
||||
$password = $this->input->post('password');
|
||||
|
||||
$result = $this->login_model->loginMe($email, $password);
|
||||
|
||||
// print_r( $result);
|
||||
if(count($result) > 0)
|
||||
{
|
||||
foreach ($result as $res)
|
||||
@ -79,17 +84,19 @@ class Login extends CI_Controller
|
||||
'DepartmentName'=>$res->DepartmentName,
|
||||
'isLoggedIn' => TRUE
|
||||
);
|
||||
|
||||
$this->session->set_userdata($sessionArray);
|
||||
// print_r( $sessionArray);
|
||||
$this->session->set_userdata($sessionArray);
|
||||
redirect('/dashboard');
|
||||
|
||||
|
||||
|
||||
redirect('/dashboard');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set_flashdata('error', 'Email or password mismatch');
|
||||
|
||||
|
||||
redirect('/login');
|
||||
$this->session->set_flashdata('error', 'Email or password mismatch');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -248,4 +255,4 @@ class Login extends CI_Controller
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : purchaseorder (PurchaseorderController)
|
||||
* Class : requisitionform (requisitionformController)
|
||||
* User Class to control all user related operations.
|
||||
* @author : VenbaMail Mali
|
||||
* @version : 1.1
|
||||
@ -385,7 +385,7 @@ class requisitionform extends BaseController
|
||||
}
|
||||
else
|
||||
{
|
||||
$Request = array( 'Status'=>REQ_PENDING_APPROVAL,'updatedOn'=>updatedDate);
|
||||
$Request = array( 'Status'=>REQ_PENDING_APPROVAL,'updatedOn'=>$updatedDate);
|
||||
$UpdateReq = $this->requistion_model->UpdateRequistion($Request, $ReqNumber);
|
||||
}
|
||||
|
||||
@ -433,9 +433,9 @@ class requisitionform extends BaseController
|
||||
}
|
||||
|
||||
}
|
||||
echo "<script>alert('Successfully updated the Requistion details!');</script>";
|
||||
$this->requisitionlisting();
|
||||
|
||||
$this->requisitionlisting();
|
||||
echo "<script>alert('Successfully updated the Requistion details!');</script>";
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
|
||||
Currently editing:
|
||||
/home/kasiram9/public_html/sidd_uat/application/controllers/user.php
|
||||
Encoding: Reopen Switch to Code Editor Close Save
|
||||
|
||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
@ -9,7 +14,7 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
* @version : 1.1
|
||||
* @since : 15 November 2016
|
||||
*/
|
||||
class User extends BaseController
|
||||
class user extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
@ -254,17 +259,17 @@ class User extends BaseController
|
||||
else
|
||||
{
|
||||
//$EmpID = $this->input->post('EmpList');
|
||||
$roleId = $this->input->post('role');
|
||||
$role = $this->input->post('role');
|
||||
$password = $this->input->post('password');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updatedDate = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
|
||||
//echo $role;
|
||||
|
||||
$userInfo = array();
|
||||
|
||||
|
||||
$userInfo = array('password'=>getHashedPassword($password),'roleId'=>$roleId,'updatedBy'=>$this->vendorId,'updatedDtm'=>$updatedDate);
|
||||
$userInfo = array('password'=>getHashedPassword($password),'roleId'=>$role,'updatedBy'=>$this->vendorId,'updatedDtm'=>$updatedDate);
|
||||
|
||||
|
||||
|
||||
@ -280,7 +285,7 @@ class User extends BaseController
|
||||
$this->session->set_flashdata('error', 'User updation failed');
|
||||
}
|
||||
|
||||
redirect('userListing');
|
||||
redirect('userListing');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -367,4 +372,4 @@ class User extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user