How do i used a flag which does not let user login?

HI

This is kind of an problem which i am facing since a week now

I have added and extra column called as verified in my user table.

I am using an OTP kind of thing which a user needs to do to verify his mobile number

So as soon as he gets the OTP the number get verfied and the FLAG i.e the verfied coloumn in user table is set to true

If the user is not verfied it remains false

So My problem is when i am trying to login how can i check for this flag is true or it is false for that particular user

Hi, Reuben!

For example, you can use Business Logic event handlers (BeforeLogin). In the handler code you can check whether the user account is verified and throw exception if it is not.

So like

In beforelogin i can get the data from user and check if he is verified or not then create a custom exception if he is not verfied

So can i like use the same logic

of BAckendless.Persistence of and then adding the conditions using where clause or
using the Backendless user thing where we can get the data by using getCurrentUser()

or is their any alternate method to get the data from users table

So like

In beforelogin i can get the data from user and check if he is verified or not then create a custom exception if he is not verfied

So can i like use the same logic

of BAckendless.Persistence of and then adding the conditions using where clause or
using the Backendless user thing where we can get the data by using getCurrentUser()

or is their any alternate method to get the data from users table

Sir may i know whether what i ma doing is correct or not ?