I want that every user should have a password as a plain text
Why?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am developing a school portal and there are many entities who have separate record saved in separate DB e.g Teachers, Students, Staff
I want that every user should have a password as a plain text, not the hashed password. Tell me what to change in LoginController so it will check the plain text with password column rather than hashed text with password column while performing login
Client whish to see the password of all users if the password is hashed then it will not be understandable by the client or any human being. The problem of hashing is, it cannot be reversed into plain text so that's why password as a plain text is requirement
@afrasiyabhaider Passwords should not be viewable. Under any circumstance.
Why should I force him not to watch the password of students and teachers :D
Storing passwords in plaintext introduces two major attack vectors:
Admin has to enter the roll number/ teacher id, so initially, the roll number will be set as the password for student and teacher id will be set as a password for teacher and these things will be hashed and stored in the password column of teacher and student.
Not good enough. A roll number is easily found. Especially if they follow some form of pattern (i.e. incrementing: 1000, 1001, 1002, ...). So there is nothing stopping someone logging in with another roll number.
You really need to have a bit of pride in yourself and tell your client that you will not compromise security because they say so. If they ask you to do something illegal are you just going to do it because they told you to? In fact, I imagine storing sensitive information (such as passwords) is illegal in some jurisdictions as you have a duty of care to take as many precautions as possible when it comes to security. Because it will you that will get sued if the application you build is compromised. Especially when dealing with a sector such as education and holding details of children.
Please or to participate in this conversation.