Login failed with correct credentails.

1
Hi, Can someone please answer this complex issue. I am creating a custom registration and login form with the entity as “Administration.Account” and below microflow commit the details . I verified the database storage files :default.script and default.log file present under the project folder – deployment\data\database\hsqldb\default  and this is what i found.   username: “userseven” being inserted into User and Account tables perfectly as per the query. INSERT INTO "system$user" VALUES(5629499534215724,'2020-03-24 15:43:52.389000',TRUE,'2020-03-24 15:43:52.274000',NULL,FALSE,FALSE,0,FALSE,'userseven','{BCrypt}$2a$10$xnpKAgJjVM5ZkHxu7y1Jf.tK.JsN3Zndd.5MlldAcBrynz131HAkG','Administration.Account',562949953433518,5629499534215724) INSERT INTO "administration$account" VALUES(5629499534215724,'abc@gmail.com','userseven',TRUE,'Administration.Account') So why I am not able to login ?  Getting error message as “username and password is incorrect”?   Please guide.      
asked
4 answers
1

Hi Mohamed,

Did you set attribute active to true in account entity of your create action and associated a user role? If yes than please can you share the error message that you are getting in your console?

You can commit and refresh in create action itself instead of using commit action separately. 

Update: See this forum post on how to retrieve user role  

If you want to retrieve multiple user roles in one retrieve action then use ‘and’ in XPath constraint as shown in example below;

[id = '[%UserRole_Administrator%]' and 
id = '[%UserRole_User%]']

 Once you get the user role(s), associate it to the account. If its one user role then use Type=Set and for multiple user roles use Type=Add

 

Hope this helps!

answered
0

You are probably getting this message because you have not set a UserRole for the user.  If you are using the same role for every user of this entity type, I would suggest adding an After Create event that retrieves the desired role from the database and sets it to the User entity.

answered
0

Hi Mohammed Siddiqui,

Thanks. Yes I have missed to set the UserRole to the Account object. Can you guide me on how to exactly set a List of System.UserRole objects in the Create Object activity. I am getting the values from the page and creating the Account object.

 

 

Thanks in advance.

 

answered
0

Thanks a lot Jonathan. it worked and i was able to complete

answered