Change Password using code & emails

I am sorry, but I could not find any answers for this.

I am trying to create a mobile app, through which I create new users. What is the default password for each user? OR, how do I set a default random password for each user?

Also, I need to send an email with the above generated password, how do I call the password in an email?

Hi Tanveer,

You must give a password for each new user you create there is not a default. You may use the function (Built-In-function / Miscellaneous) GeneratePassword to create a random password. 

Hope this helps you. 



Just complementing Graça's answer.

1. Generate a password using the GeneratePassword or any other method you see fit (like one you create yourself).

2. Encrypt the password (Users module) to store in the Users entity.

3. Send in the mail the plain text password.

Hope this helps.

Eduardo Jauch