if condition in sign in page

I' Trying to add an if condition that will only allow approved users to log in based on user attribute status (extended entity profile) This is what I tried to do but it did not work

Hello Joharah,

Can you provide a little more information?

  • When you say "it did not work" - what didn't work?  What was the result?
  • What is the Condition in your if statement?
  • How is your aggregate filtering?

Thank you!

Hi Joharah,

Can you share your .OML, to see what happens?

Tnks.


Hi Joharak,

Are you saying that even after having checks in place the user is logging into the system successfully (Non approved user) ?

Could you please check if your true false connector of if blocks are as expected ?


Regards,


Craig St.Jean wrote:

Hello Joharah,

Can you provide a little more information?

  • When you say "it did not work" - what didn't work?  What was the result?
  • What is the Condition in your if statement?
  • How is your aggregate filtering?

Thank you!

the condition in the if statement checks if the value of the status is  3 (which corresponds to approved) and I'm filtering the aggregate using the username since it is a unique value for each user. when I try to log in even with approved user it gives me the error message  


Hi Joharak, 

can you provide if statement condition and you your entity structure.

else you have to check you if block condition.


Regards

Rahul Sahu

Hi,

1. Did you debug the Login to see where the error happens and try to see what is wrong?

2. What are you passing as values to the User_Login action?

3. Which error message?

Cheers

Rahul Sahu wrote:

Hi Joharak, 

can you provide if statement condition and you your entity structure.

else you have to check you if block condition.


Regards

Rahul Sahu

GetProfilesByusername.List.Current.Profile.Status = 3 < this is my statement

I'm using the user entity extended to profile entity that contains extra info I want to collect from the user. the above aggregate is a join of the 2.

Eduardo Jauch wrote:

Hi,

1. Did you debug the Login to see where the error happens and try to see what is wrong?

2. What are you passing as values to the User_Login action?

3. Which error message?

Cheers

I am passing the username and passwords from the local variables that are saved from the input.

the error message that shows is the message I added (the result of the false of the if statement)

I tried to use the debugger but it seems like nothing is happening (it starts but nothing pops up and it just stays blank)


Solution

Thanks everyone for all the help! I tried it a different way and it worked.

Instead of checking if the value of the status is what I want I used the status required as a filter along with the username and checked if the aggregate is empty or not

Solution