문제

" How can I prevent users to login twice from different machines? The Users should only be allowed to login once on the machine. Once he or she login into different machine, the previous machine will logout automatically. How can be implement in magento. is there any plugin that will do this task ???

도움이 되었습니까?

해결책

There is a section "Online Customers" under Customers in Admin.

Here magento shows name, email, ip address, session start time, last activity and last url accessed.

you can call 'log/visitor_online' model and get list of all currently online customers/ visitors.

Now whenever a customer logs in, you can make a custom observer and call its function to match email of that customer with all this data you got from model.

and logout cutomer from previous device if you find a record same.

Hope you understand my point.

다른 팁

I wrote a small extension to enforce the rule you're looking for - allow an admin user to have only one active session. It's a beta release, so test thoroughly.

https://github.com/siliconrockstar/magento-admin-single-session

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top