Yii Framework Forum: How to determine the session is defined or not for Yii::app()=>user? - Yii Framework Forum

Jump to content

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

How to determine the session is defined or not for Yii::app()=>user? Rate Topic: -----

#1 User is offline   holala 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 74
  • Joined: 23-December 09

Posted 21 January 2010 - 03:18 AM

i want use
Yii::app()->user->setState('name',$value);

but i want determine is the 'name' set first?

how?

Thanks!
0

#2 User is offline   bas_vdl 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 215
  • Joined: 01-April 09

Posted 21 January 2010 - 04:08 AM

http://www.yiiframew...asState-detail. hasState, {return} boolean, whether there is a state of the specified name.

Yii::app()->user->hasState('name');

1

#3 User is offline   holala 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 74
  • Joined: 23-December 09

Posted 21 January 2010 - 06:07 AM

thank you very much!
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