ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aditya Sharma <aditya.sha...@hotwaxsystems.com>
Subject Re: OFBiz duplicate user logins
Date Fri, 23 Nov 2018 12:45:58 GMT
Adding to that,

You can find entries in Visit entity for the logged in users.

Refer
https://demo-trunk.ofbiz.apache.org/webtools/control/FindGeneric?entityName=Visit
and https://demo-trunk.ofbiz.apache.org/partymgr/control/listLoggedInUsers .

When a user session is destroyed, thruDate is set to Visit
entry in ControlEventListener which is custom HttpSessionListener
implementation. Refer
http://svn.apache.org/repos/asf/ofbiz/branches/release16.11/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlEventListener.java

You can check if there is an entry in the Visit entity for the particular
userLoginId without thruDate. You can use the filterByDate() method of
EntityQuery API to filter out such entries.

Thanks and Regards,

*Aditya Sharma* | Enterprise Software Engineer
HotWax Commerce <http://www.hotwax.co/> by HotWax Systems
<http://www.hotwaxsystems.com/>
[image: https://www.linkedin.com/in/aditya-p-sharma/]
<https://www.linkedin.com/in/aditya-p-sharma/>


On Thu, Nov 22, 2018 at 11:33 AM Deepak Dixit <deepak.dixit@hotwax.co>
wrote:

> Hi User,
>
> You can use LoginWorker.isUserLoggedIn method to check if a user logged in
> or not.
>
> Thanks & Regards
> --
> Deepak Dixit
>
>
>
> On Thu, Nov 22, 2018 at 11:27 AM jstric15 <jstric15@bellsouth.net> wrote:
>
> > Trying to set up Ofbiz as a service with multiple users, and wanted to
> know
> > if there is a way to prevent a user from logging in twice. I want to
> > prevent
> > two users from logging in under the same User ID.
> >
> > I know there are a number of ways to programmatically do this, but cant
> > seem
> > to find a parameter that would prevent it out of the box, which would be
> > the
> > preferred way.
> >
> >
> >
> > --
> > Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message