[Solved] Send Username And Password Encrypted

Hy everyone, sorry for my bad english.

This is my situation:

  • I make an alumni web using Yii

  • I encrypt the password with crypt(password)

  • Registration step is:

    1. alumni fill name, address, email, no.id when they school

    2. admin, confirm that person. If data valid

    3. admin, fill username and password for that person then save to Database

    4. admin, go to the web (admin form) then click 1 button which automatically to send username and password to their email.

So my question is:

  1. Is my step correct?? or have any idea??

  2. I know how to send user and pass automatically, but the problem is, how to send password which have been encrypted?? I have an idea to make 1 field which save password which not encrypted, is my idea correct??


Where do you want to send that password?

Do you want to send the username and password through e-mail to the user?

Yes, i want send it via email. Someone at stackoverflow.com, tell me to leave the password blank, so when i want send it, first generate the password, then send it via email, after that


then save to DB. Is that good idea??

According to your previously described plan for creating the register account section, I think this idea is very well suited. [size=2]A colleague told me that sending passwords in e-mails is not very secure.[/size]

Why you don’t give the user ability to fill username and password. And when admin checks if data is ok to activate user account. User will recieve email with confirmation.

Nice idea, i will consider it. Do you have reference/tutorial about configure activate user account in Yii??

The simplest idea is to have one field in user table status and by default it will be 0 (false).

In your login logic you have to allow login only for users with status = 1 (true).

After user is registered admin will check data and only he will be able to change status to active (1).

You can check this extension I thing there was something like that link