Yii Framework Forum: User details - Yii Framework Forum

Jump to content

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

User details Rate Topic: -----

#1 User is offline   manilodisan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 80
  • Joined: 17-September 09
  • Location:Bucharest

Posted 04 October 2009 - 03:13 PM

Any idea why getName() returns my username and getIsGuest() returns true after calling login()?
0

#2 User is offline   jayrulez 

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

Posted 04 October 2009 - 03:25 PM

View Postmanilodisan, on 04 October 2009 - 03:13 PM, said:

Any idea why getName() returns my username and getIsGuest() returns true after calling login()?


getName returns the string you use to login because that is what is returned by the method in CUserIdentity, if you want it to return something different then you should override the method in your UserIdentity class. getIsGuest should only return true if the state of __id is null. You could post your methods so we can see what you are doing or you could check out the http://code.google.c...i-skeleton-app/ to see how authentication is managed employing DB
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

#3 User is offline   manilodisan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 80
  • Joined: 17-September 09
  • Location:Bucharest

Posted 04 October 2009 - 05:13 PM

Thanks jayrulez.
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