Logging In

Good day, Dear Yii-programmers.

I have a problem in my new project(Tennis club site) with logging in. I made table tbl_user which

stores information about tennis players(username,password,…).

This table has the same structure as table tbl_user in YII demo-project blog, plus a few additional fields.

CREATE TABLE IF NOT EXISTS tbl_user (

id int(11) NOT NULL AUTO_INCREMENT,

username varchar(128) COLLATE utf8_unicode_ci NOT NULL,

password varchar(128) COLLATE utf8_unicode_ci NOT NULL,

salt varchar(128) COLLATE utf8_unicode_ci NOT NULL,

email varchar(128) COLLATE utf8_unicode_ci NOT NULL,

name varchar(64) COLLATE utf8_unicode_ci NOT NULL,

sname varchar(128) COLLATE utf8_unicode_ci NOT NULL,

fname varchar(128) COLLATE utf8_unicode_ci NOT NULL,

atp_rate int(11) DEFAULT NULL,

photo varchar(90) COLLATE utf8_unicode_ci NOT NULL,

profile text COLLATE utf8_unicode_ci,

PRIMARY KEY (id)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ;

And I’ve delete a row containing demo-user in this table. I’ve add the following row:

(9, ‘root’, ‘db25c4e2b76f98e569332b33bbe058fe’, ‘28b206548469ce62182048fd9cf91760’, ‘Y@y.net’, ‘●●●●’, ‘●●●●’, ‘●●●●’, 435, ‘lemons.jpg’, NULL);

But still I could login under unexisting “demo”-user. And I could not login under “root”-user I’ve just made.

In a demo-project I’ve add into tbl_user this row(without additional fields)

(9, ‘root’, ‘db25c4e2b76f98e569332b33bbe058fe’, ‘28b206548469ce62182048fd9cf91760’, ‘Y@y.net’, NULL);

And now i can login under root. Curious why the same thing working in demo-project, while sendind error "Incorrect username or password"

in my project.

[color="#006400"]/* moved from Tips and Tutorials forum */[/color]