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');
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,7 +69,7 @@ class Login extends CI_Controller
|
|||||||
$password = $this->input->post('password');
|
$password = $this->input->post('password');
|
||||||
|
|
||||||
$result = $this->login_model->loginMe($email, $password);
|
$result = $this->login_model->loginMe($email, $password);
|
||||||
|
// print_r( $result);
|
||||||
if(count($result) > 0)
|
if(count($result) > 0)
|
||||||
{
|
{
|
||||||
foreach ($result as $res)
|
foreach ($result as $res)
|
||||||
@ -79,17 +84,19 @@ class Login extends CI_Controller
|
|||||||
'DepartmentName'=>$res->DepartmentName,
|
'DepartmentName'=>$res->DepartmentName,
|
||||||
'isLoggedIn' => TRUE
|
'isLoggedIn' => TRUE
|
||||||
);
|
);
|
||||||
|
// print_r( $sessionArray);
|
||||||
$this->session->set_userdata($sessionArray);
|
$this->session->set_userdata($sessionArray);
|
||||||
|
|
||||||
redirect('/dashboard');
|
redirect('/dashboard');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->session->set_flashdata('error', 'Email or password mismatch');
|
|
||||||
|
|
||||||
redirect('/login');
|
redirect('/login');
|
||||||
|
$this->session->set_flashdata('error', 'Email or password mismatch');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
require APPPATH . '/libraries/BaseController.php';
|
require APPPATH . '/libraries/BaseController.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class : purchaseorder (PurchaseorderController)
|
* Class : requisitionform (requisitionformController)
|
||||||
* User Class to control all user related operations.
|
* User Class to control all user related operations.
|
||||||
* @author : VenbaMail Mali
|
* @author : VenbaMail Mali
|
||||||
* @version : 1.1
|
* @version : 1.1
|
||||||
@ -385,7 +385,7 @@ class requisitionform extends BaseController
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$Request = array( 'Status'=>REQ_PENDING_APPROVAL,'updatedOn'=>updatedDate);
|
$Request = array( 'Status'=>REQ_PENDING_APPROVAL,'updatedOn'=>$updatedDate);
|
||||||
$UpdateReq = $this->requistion_model->UpdateRequistion($Request, $ReqNumber);
|
$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');
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
require APPPATH . '/libraries/BaseController.php';
|
require APPPATH . '/libraries/BaseController.php';
|
||||||
@ -9,7 +14,7 @@ require APPPATH . '/libraries/BaseController.php';
|
|||||||
* @version : 1.1
|
* @version : 1.1
|
||||||
* @since : 15 November 2016
|
* @since : 15 November 2016
|
||||||
*/
|
*/
|
||||||
class User extends BaseController
|
class user extends BaseController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* This is default constructor of the class
|
* This is default constructor of the class
|
||||||
@ -254,17 +259,17 @@ class User extends BaseController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//$EmpID = $this->input->post('EmpList');
|
//$EmpID = $this->input->post('EmpList');
|
||||||
$roleId = $this->input->post('role');
|
$role = $this->input->post('role');
|
||||||
$password = $this->input->post('password');
|
$password = $this->input->post('password');
|
||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
$updatedDate = $dt->format('Y-m-d H:i:s');
|
$updatedDate = $dt->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
//echo $role;
|
||||||
|
|
||||||
$userInfo = array();
|
$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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user