WizyWyg
|
| Posted: 01/23/2003, 12:36 PM |
|
User authentication using MD5() stored passwords from the DB. Does CCS handle it?
|
|
|
 |
Wizywyg
|
| Posted: 01/23/2003, 1:50 PM |
|
Alright, figured it out. Just changed the query in the Common.php file.
now onto the next one to figure out.
|
|
|
 |
BB
|
| Posted: 01/23/2003, 3:23 PM |
|
Please post your common.php change to the group.
|
|
|
 |
Wizywyg
|
| Posted: 01/23/2003, 3:48 PM |
|
Depending on your project and what tables you need reference, and what the value of the form is being passed.
For example, the login form contains
input field name "login"
input field name "password"
In the DB
table "users" using "user_id" "group_id" "user_login" and "user_password" which is an MD5 hash in the db. group_id is the group they belong to and determines if they are "normal" users or the "admin" and based on that information, later, it will allow admins to manage what they are doing.
in your common.php look for:
//CCLoginUser
change the sql query to something like this:
$SQL = "SELECT `user_id`, `group_id` FROM `users` WHERE `user_login`=" . $db->ToSQL($login, "ccsText") . " AND `user_password`=" . $db->ToSQL(md5($password), "ccsText");
and edit to match your db tables and your form values; so in the example above
from the login form passing the $password in the query above will hash the inputed password and then match it to the password stored in the DB.
|
|
|
 |
|