OFBiz duplicate user logins

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

OFBiz duplicate user logins

jstric15
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
Jim
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz duplicate user logins

Deepak Dixit-4
Hi User,

Your email has been moderated, Please subscribe to the mailing list
http://ofbiz.apache.org/mailing-lists.html
Thanks & Regards
--
Deepak Dixit



On Thu, Nov 22, 2018 at 11:27 AM jstric15 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz duplicate user logins

Deepak Dixit-4
In reply to this post by jstric15
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz duplicate user logins

Aditya Sharma
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 <[hidden email]>
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 <[hidden email]> 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
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz duplicate user logins

Shi Jinghai-3
In reply to this post by jstric15
Hi jstric15,


The function you requested is not OOTB now, but you can create a jira to make it OOTB in the future. Adding a login policy check after authentication passed, if single-login preferred, then reject the new login. We implemented such a function in our customized system for pos, i.e., when a cashier is on duty, a new login for the cashier is not allowed.



Kind Regards,



Shi Jinghai





-----邮件原件-----
发件人: jstric15 [mailto:[hidden email]]
发送时间: 2018年11月22日 5:02
收件人: [hidden email]
主题: OFBiz duplicate user logins



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
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz duplicate user logins

jstric15@gmail.com
In reply to this post by jstric15
Thanks for the help guys. This brings up another question though. If a user id is "hung up", meaning that the user id has no "Through Date" entry, is there a way OOTB to go in and terminate this user (an admin function)?

I just want to be through when I write up the use cases for the developers.

Again, thanks for the help.

On 2018/11/21 21:01:44, jstric15 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: OFBiz duplicate user logins

Jacques Le Roux
Administrator
Hi,

Your message has been moderated.

Please subscribe to the user ML for such questions and then use your email client rather than the Nabble forum (as the forum says to you)
See also why here http://ofbiz.apache.org/mailing-lists.html

You will get a better support and it's more fair to share with everybody
The wider the audience the better the answers you might get

Also it's more work for moderators who have to accept your messages as long as you have not subscribed.
I'll personally no longer accept them (other moderators still could)

Thanks

Jacques


Le 26/11/2018 à 16:50, [hidden email] a écrit :

> Thanks for the help guys. This brings up another question though. If a user id is "hung up", meaning that the user id has no "Through Date" entry, is there a way OOTB to go in and terminate this user (an admin function)?
>
> I just want to be through when I write up the use cases for the developers.
>
> Again, thanks for the help.
>
> On 2018/11/21 21:01:44, jstric15 <[hidden email]> 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
>>