From 145d31e4f74c9b890c65ea9ca68020e6dd5b16da Mon Sep 17 00:00:00 2001
From: nivetha <nivetha.mariappan@tarento.com>
Date: Thu, 10 Feb 2022 11:39:40 +0530
Subject: [PATCH] Fixed issue with updating user profile

---
 src/main/java/com/tarento/retail/dao/impl/UserDaoImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/com/tarento/retail/dao/impl/UserDaoImpl.java b/src/main/java/com/tarento/retail/dao/impl/UserDaoImpl.java
index 230a1e6..11ac9e0 100644
--- a/src/main/java/com/tarento/retail/dao/impl/UserDaoImpl.java
+++ b/src/main/java/com/tarento/retail/dao/impl/UserDaoImpl.java
@@ -182,7 +182,8 @@ public class UserDaoImpl implements UserDao {
 	public User update(final User user) {
 		try {
 			jdbcTemplate.update(UserQueries.UPDATE_USER,
-					new Object[] { user.getEmailId(), user.getUsername(), user.getPhoneNo(), user.getIsActive(),
+					new Object[] { user.getEmailId(), user.getUsername(), user.getPhoneNo(),
+							(user.getIsActive() != null) ? user.getIsActive() : Boolean.TRUE,
 							(user.getIsDeleted() != null) ? user.getIsDeleted() : Boolean.FALSE, user.getTimeZone(),
 							user.getAvatarUrl(), user.getId() });
 		} catch (Exception e) {
-- 
GitLab