
In this tutorial we will discuss about setting up our Yii application
- Our Web Apps will have user registration page
- Our Web Apps will varified user registration trough emails activation
The first thing is we need to look into our User table or our User model. Im setting up my tbl_user as below. Im also insert sample record :
[php]
—
— Table structure for table tbl_user
—
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,
joined
date NOT NULL,
activationcode
int(11) NOT NULL,
activationstatus
int(11) NOT NULL,
profile
text COLLATE utf8_unicode_ci,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=11 ;
—
— Dumping data for table tbl_user
—
INSERT INTO tbl_user
(id
, username
, password
, salt
, email
, joined
, activationcode
, activationstatus
, profile
) VALUES
(1, ‘demo’, ‘2e5c7db760a33498023813489cfadc0b’, ’28b206548469ce62182048fd9cf91760′, ‘webmaster@example.com’, ‘0000-00-00’, 0, 0, NULL);
[/php]
[Read more…] about Understand Yii Authentication Intermediate