Skip to content

Commit

Permalink
changed datetime format in user controller
Browse files Browse the repository at this point in the history
  • Loading branch information
kishor10d committed May 8, 2017
1 parent 4d95cfe commit a886806
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions application/controllers/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function addNewUser()
$mobile = $this->input->post('mobile');

$userInfo = array('email'=>$email, 'password'=>getHashedPassword($password), 'roleId'=>$roleId, 'name'=> $name,
'mobile'=>$mobile, 'createdBy'=>$this->vendorId, 'createdDtm'=>date('Y-m-d H:i:sa'));
'mobile'=>$mobile, 'createdBy'=>$this->vendorId, 'createdDtm'=>date('Y-m-d H:i:s'));

$this->load->model('user_model');
$result = $this->user_model->addNewUser($userInfo);
Expand Down Expand Up @@ -218,13 +218,13 @@ function editUser()
if(empty($password))
{
$userInfo = array('email'=>$email, 'roleId'=>$roleId, 'name'=>$name,
'mobile'=>$mobile, 'updatedBy'=>$this->vendorId, 'updatedDtm'=>date('Y-m-d H:i:sa'));
'mobile'=>$mobile, 'updatedBy'=>$this->vendorId, 'updatedDtm'=>date('Y-m-d H:i:s'));
}
else
{
$userInfo = array('email'=>$email, 'password'=>getHashedPassword($password), 'roleId'=>$roleId,
'name'=>ucwords($name), 'mobile'=>$mobile, 'updatedBy'=>$this->vendorId,
'updatedDtm'=>date('Y-m-d H:i:sa'));
'updatedDtm'=>date('Y-m-d H:i:s'));
}

$result = $this->user_model->editUser($userInfo, $userId);
Expand Down Expand Up @@ -257,7 +257,7 @@ function deleteUser()
else
{
$userId = $this->input->post('userId');
$userInfo = array('isDeleted'=>1,'updatedBy'=>$this->vendorId, 'updatedDtm'=>date('Y-m-d H:i:sa'));
$userInfo = array('isDeleted'=>1,'updatedBy'=>$this->vendorId, 'updatedDtm'=>date('Y-m-d H:i:s'));

$result = $this->user_model->deleteUser($userId, $userInfo);

Expand Down Expand Up @@ -307,7 +307,7 @@ function changePassword()
else
{
$usersData = array('password'=>getHashedPassword($newPassword), 'updatedBy'=>$this->vendorId,
'updatedDtm'=>date('Y-m-d H:i:sa'));
'updatedDtm'=>date('Y-m-d H:i:s'));

$result = $this->user_model->changePassword($this->vendorId, $usersData);

Expand Down

0 comments on commit a886806

Please sign in to comment.