Commit dba4e5610f199223cf57096194e0f16498dc0cf9
1 parent
78c07a91
Null check
Showing
1 changed file
with
7 additions
and
7 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -161,42 +161,42 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
161 | 161 | if ($("#messageModal").length > 0) { |
162 | 162 | $("#messageModal").modal('hide'); |
163 | 163 | } |
164 | - if (result.LoginFailureCauseId.toString() == LoginConstants.E_PASSWORD_NOT_MATCH) { | |
164 | + if (result.LoginFailureCauseId!=undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_PASSWORD_NOT_MATCH) { | |
165 | 165 | $rootScope.isVisibleLogin = true; |
166 | 166 | $rootScope.errorMessage = LoginMessageConstants.INVALID_PASSWORD; |
167 | 167 | $("#messageModal").modal('show'); |
168 | 168 | } |
169 | - else if (result.LoginFailureCauseId.toString() == LoginConstants.E_USER_ID_BLOCKED_24_HRS) | |
169 | + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_ID_BLOCKED_24_HRS) | |
170 | 170 | { |
171 | 171 | $rootScope.isVisibleLogin = true; |
172 | 172 | $rootScope.errorMessage = LoginMessageConstants.USER_BLOCKED; |
173 | 173 | $("#messageModal").modal('show'); |
174 | 174 | } |
175 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo!= null) && (result.LicenseInfo!= undefined) && (result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) | |
175 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) | |
176 | 176 | { |
177 | 177 | $rootScope.isVisibleLogin = true; |
178 | 178 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
179 | 179 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
180 | 180 | $("#messageModal").modal('show'); |
181 | 181 | } |
182 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
182 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
183 | 183 | $rootScope.isVisibleLogin = true; |
184 | 184 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
185 | 185 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
186 | 186 | $("#messageModal").modal('show'); |
187 | 187 | } |
188 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
188 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
189 | 189 | $rootScope.isVisibleLogin = true; |
190 | 190 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
191 | 191 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
192 | 192 | $("#messageModal").modal('show'); |
193 | 193 | } |
194 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
194 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
195 | 195 | $rootScope.isVisibleLogin = true; |
196 | 196 | $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
197 | 197 | $("#messageModal").modal('show'); |
198 | 198 | } |
199 | - else if (result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) { | |
199 | + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) { | |
200 | 200 | $rootScope.isVisibleLogin = true; |
201 | 201 | $rootScope.errorMessage = LoginMessageConstants.USER_INACTIVE_MESSAGE; |
202 | 202 | $("#messageModal").modal('show'); | ... | ... |