Yii Framework Forum: How Do I Get The Default User Management - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How Do I Get The Default User Management Rate Topic: -----

#1 User is offline   kamau 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 04-November 13
  • Location:Nairobi

Posted 04 November 2013 - 04:42 AM

am newin yii. i desparately need to remove the default yii user management. I have created the user table on my database. have the model in place and the crud components are ready. useridentity code looks like
$users= User::model()->findByAttributes(array('username'=>$this->username));

if($users===null) {
$this->errorCode = self::ERROR_USERNAME_INVALID;
}
else if(!$users->validatePassword($this->password)) {
$this->errorCode = self::ERROR_PASSWORD_INVALID;
}
else {
$this->errorCode = self::ERROR_NONE;
$this->_id = $users->id;
}
return !$this->errorCode;
}

public function getId() {
return $this->_id;
}

please assist
0

#2 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,701
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 04 November 2013 - 05:01 AM

Any specific problems?
God is real unless declared as integer
0

#3 User is offline   kamau 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 04-November 13
  • Location:Nairobi

Posted 04 November 2013 - 05:29 AM

View PostORey, on 04 November 2013 - 05:01 AM, said:

Any specific problems?

yes. I need to use the login form. validate with what is in the database. and load the index.php page of my site if the username and password are correct.

ps> thanks for replying
0

#4 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,701
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 04 November 2013 - 05:44 AM

I'm pretty sure this is already done in the initial Yii installation, you can use it as example.

You may also want to read this carefully:
http://www.yiiframew.../en/topics.auth

PS. Plz try to be more specific, like "I've tried this, and get that error".
God is real unless declared as integer
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users