Yii Framework Forum: newbie : $user=User::model()->find - Yii Framework Forum

Jump to content

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

newbie : $user=User::model()->find yii-blog-1.1rc.pdf Rate Topic: ***-- 1 Votes

#1 User is offline   amin888 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 03-January 10
  • Location:Jambi, Indonesia

Posted 03 January 2010 - 03:37 AM

Hi.. I'm newbie on learning Yii.
Right now, I'm reading yii-blog-1.1rc.pdf

On page 19, I can't method find that belong to User::model or its parent classes.. I'm confused :(

<?php
class UserIdentity extends CUserIdentity
{
   private $ id;
   public function authenticate()
   {
      $username=strtolower($this->username);
      $user=User::model()->find('LOWER(username)=?',array($username));
      if($user===null)
         $this->errorCode=self::ERROR USERNAME INVALID;
      else if(md5($this->password)!==$user->password)

0

#2 User is offline   amin888 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 03-January 10
  • Location:Jambi, Indonesia

Posted 03 January 2010 - 04:43 AM

still waiting for some assistance... i miss quick reply from others just like in ubuntuforums.org
0

#3 User is offline   jayrulez 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 348
  • Joined: 29-July 09

Posted 03 January 2010 - 09:29 AM

View Postamin888, on 03 January 2010 - 04:43 AM, said:

still waiting for some assistance... i miss quick reply from others just like in ubuntuforums.org



http://www.yiiframew...rd#model-detail
php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";

python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]

ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}


You say Tomato, I say Tomato.
0

#4 User is offline   amin888 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 03-January 10
  • Location:Jambi, Indonesia

Posted 03 January 2010 - 09:46 AM

thanks jayrulez...

i should have searched function find until class CActiveRecord :)

View Postjayrulez, on 03 January 2010 - 09:29 AM, said:


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