User password not being hashed and cant login with newly created user.

User password not being hashed and cant login with newly created user.

Hi there, so have this problem...

Im creating users in the default OutSystems database, i just dragged and dropped all the enteties on a form 
See picture 1 attached.

The next picture is a screen shot of how it is stored in the database. You can see that the password is saved in normal text and the other admin user's password is hashed.
See picture 2 attached.

And when you co into the outsystems user function and enter the user the system sees as the user has no password. You can then set it.
See Picture 3 attached.

When you go and set the password in the user admin, you can actually login with it. And the password is hashed like the previous.
See picture 4 attached.

Am I doing something wrong? How can I fix it??

Thanks in advanced

Hi Heinrich,

You need to use the built-in function Encrypt to store the password on the database. Before you send the data to the database you must use this function to encrypt the password value and then assign the ouput of it to the password field. You can do this by adding the action to the flow and an assign node to bind the output to the password field or you can use it like a function on the assign node.

Hi André!

Thanks so much for the help! :D

Im not exactly sure how to do that? can you reccomend some steps? or where I would find the encryption "module"?

I was fidling around in the flow and adding an action, but unsure of what I must drag and drop from where.

But ill continue to try! thanks for the reply, it makes sence... but I dont know yet where to find all the different things in outsytems.

Kind Regards

Hi Heinrich,

Encrypt is a built-in function. You should use it in an assign node before you use the CreateOrUpdateUser action  - that stores that user on the database - to encrypt the user input and set that output on the password attribute of the User entity.

I'm intrigued, if you're starting, why are you fidling around this. Doesn't Users server your purpose?
Be sure to check out our online training