Yii 1.1: cookiewebuser

Yii cookie-based WebUser component
6 followers

CookieWebUser is a Yii component that using cookie only store for user auth info. It doesn't use server-side store (memcache, $_SESSION etc). This component can be used in highload projects.

Requirements

Yii Framework 1.x or above.

Usage

  • Add CookieWebUser.php to protected/components.
  • Add this code to 'user' component section in protected/config/main.php:
'components' => array(
    'user' => array(
        'class' => 'CookieWebUser',
        'secretKey' => 'secret key',
        'cookieName' => 'cookie name',
        'cookieDomain' => 'cookie domain',
    ),

WARNING!!! Persistent states and flash messages not implemented yet.

Version

0.1 - Initial release

Todo

  • persistent states and flash messages

Resources

Total 1 comment

#7950 report it
amiri at 2012/04/27 11:05pm
Go On!

I would like to know if anyone has used this method is a real world. It’s so good to continue this idea, Current login systems based on "Session" have heavy load on server. Specially this fact that "session based” login systems usually save sessions on database.

How we can get a list of On-line users?

Leave a comment

Please to leave your comment.

Create extension