sfUserOnlinePlugin
1.0.2stable
for sf 1.4sf 1.3 MIT
sfUserOnlinePlugin
This plugin allow you to manage user status by changing user class in your factories.yml to sfUserOnline. This class
extends sfUser class and you don't drop any user logic.
User status saved in memcached with lifetime value so after some time user status changed to "Offline".
Developers
| Name |
Status |
Email |
Yura Rodchyn |
lead |
moc.liamg <<ta>> nyhcdor
|
License
Copyright (c) 2010 Yura Rodchyn
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Releases for sf 1.4
| Version |
License |
API |
Released |
|
1.0.2stable
|
MIT license |
1.0.0stable
|
16/03/2010 |
|
1.0.1stable
|
MIT license |
1.0.0stable
|
16/03/2010 |
|
1.0.0stable
|
MIT license |
1.0.0stable
|
16/03/2010 |
|
0.0.14alpha
|
MIT license |
0.0.14alpha
|
16/03/2010 |
|
0.0.13alpha
|
MIT license |
0.0.13alpha
|
16/03/2010 |
Releases for sf 1.3
| Version |
License |
API |
Released |
|
1.0.2stable
|
MIT license |
1.0.0stable
|
16/03/2010 |
|
1.0.1stable
|
MIT license |
1.0.0stable
|
16/03/2010 |
|
1.0.0stable
|
MIT license |
1.0.0stable
|
16/03/2010 |
|
0.0.14alpha
|
MIT license |
0.0.14alpha
|
16/03/2010 |
|
0.0.13alpha
|
MIT license |
0.0.13alpha
|
16/03/2010 |
Releases for sf 1.2
| Version |
License |
API |
Released |
|
0.0.12alpha
|
MIT license |
0.0.12alpha
|
16/03/2010 |
Changelog for release 1.0.2 - 16/03/2010
Other releases
Release 1.0.2 - 16/03/2010
Release 1.0.1 - 16/03/2010
- me: add getStatusForUser($user_id) to retrieve user status
- me: add some description
Release 1.0.0 - 16/03/2010
Release 0.0.14 - 16/03/2010
- me: fix leader in package.xml
Release 0.0.13 - 16/03/2010
Release 0.0.12 - 16/03/2010
- me: add normal installation by plugin:install
sfUserOnlinePlugin
This plugin allow you to manage user status by changing user class in your factories.yml to sfUserOnline. This class
extends sfUser class and you don't drop any user logic.
Installation
Run from command line
php symfony plugin:install sfUserOnlinePlugin
Add or select sfUser method to get user unique ID.
It can be sfUser::getUserName or sfUser::getId and set it in factories.yml
Set in factories.yml
user:
class: sfUserOnline
param:
user_unique_method: "getId" # sfUser method to get unique user ID
memcache_host: "127.0.0.1"
memcache_port: 11211
status_lifetime: 600
memcache_prefix: "ustatus_"
online_status_class: onlineMemcacheStorage
Retrieve user status
To get self status
$this->getUser()->getStatus();
To set self status
$this->getUser()->setStatus($status);
To get other user status
$this->getUser()->getStatusForUser($userId);