public function validateloginAction($uname, $password){
$user = Tbluser::findfirst("user_id = '$uname' AND user_password='$password' AND user_status='active'");
if(!$user){
echo"username or password error";
}
else{
$datetoday = date("Y-m-d H:i:s");
$user = Tbluser::findfirst("user_id = '$uname'");
$updatelogin = $user->user_lastlogin = '$datetoday';
if(!$updatelogin){
echo"error in updating record";
}
return $this->forward('product/addproduct');
}
}
my user_lastlogin that has a DATETIME datatype in my tbluser is not updating its value.