From user-return-54576-archive-asf-public=cust-asf.ponee.io@ofbiz.apache.org Fri Nov 23 13:46:18 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 88528180660 for ; Fri, 23 Nov 2018 13:46:17 +0100 (CET) Received: (qmail 50616 invoked by uid 500); 23 Nov 2018 12:46:16 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Received: (qmail 50604 invoked by uid 99); 23 Nov 2018 12:46:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2018 12:46:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4EBC018AC0F for ; Fri, 23 Nov 2018 12:46:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.861 X-Spam-Level: * X-Spam-Status: No, score=1.861 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-1.46, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=hotwaxsystems-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 8ZrPDmf14G2o for ; Fri, 23 Nov 2018 12:46:11 +0000 (UTC) Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 608535FAED for ; Fri, 23 Nov 2018 12:46:11 +0000 (UTC) Received: by mail-lf1-f68.google.com with SMTP id p17so8644568lfh.4 for ; Fri, 23 Nov 2018 04:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotwaxsystems-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=lkWkJ/HGQFXgZ4tb/cq6svHuCt6QzJhYMPyHOUiF8Ws=; b=TjynWTMApxpRHntwxvk/e/N9yAAISFlw+UallikdSYbgD6FbHXNsAstkt+FI4LinRz 0gHIIHOnk8EHClu05bJiTkPsdweUxQGq6EpdpS1pg0VUkgkYesOFsYMN+kcUeXwbt/FV u66YiDbdZYgMycPAWZcXbSNpoga1+vzzvcE7Cs4AEGZMCsN5K+0GzAgtf6V4UlF4g02N RujEGbI/MlkNVHR8omf/azPdeXsamTQSSbPX3Suu4v2SjXqYKCarPXsJVHit143+3s4S WVO05ug966JtSfqH4vSzCUFW/gRYY6pKcJYjepEPce90IryfoQdI3PYaGTn8Erzx8/mG +60Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=lkWkJ/HGQFXgZ4tb/cq6svHuCt6QzJhYMPyHOUiF8Ws=; b=hcb1bLmkAuiE8QKA5Z7QF7vsKb3IZbG/SAoGfSg73fDpCGxxY1/vR7IRzRBdttFKTS KbrDHX5Ui2CqiFWc7SUc21XlyfZVe5eNcXt1u4Uxegxgncwoj6I4cUElpGHhhQ8oodEv Tri8knsesuOuBZnUhZM8BAKFKGMgEI1wTDa86XhLCxDCCnFa5EtDrZHvujYI1LAx9PzL 3TD/96E922pRPwJNu4h/QJCXX6jWj922n5A3rztsA81Prnr0Co1ahDimfAnI1L/S1Mcp 2C9yWIA+6yIipq6SwJrm532/PPE7YINCIvqOk8/YS9SlHPFy3boLH+EGz5iBtVfw6rNq 44zg== X-Gm-Message-State: AGRZ1gKP6uQqm/WehBxz8IeGhX5tH2pH5aIc7mSbirOntxHmihF0iXx0 JbnkKNukKS9AkaORigyflqN6CelUl8+tDBO3GlbTgChU48Y= X-Google-Smtp-Source: AJdET5eYW+t3ay4Trfcr1Utv50220qgc+TOfbA9q50q5EZ+2q9uvA1CwzVpgk+mimSorqMADOG9F8PUP/ma6ktQLewI= X-Received: by 2002:a19:3fcf:: with SMTP id m198mr8892379lfa.106.1542977170387; Fri, 23 Nov 2018 04:46:10 -0800 (PST) MIME-Version: 1.0 References: <1542834104107-0.post@n4.nabble.com> In-Reply-To: From: Aditya Sharma Date: Fri, 23 Nov 2018 18:15:58 +0530 Message-ID: Subject: Re: OFBiz duplicate user logins To: user@ofbiz.apache.org Content-Type: multipart/alternative; boundary="000000000000235412057b545eaa" --000000000000235412057b545eaa Content-Type: text/plain; charset="UTF-8" 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 by HotWax Systems [image: https://www.linkedin.com/in/aditya-p-sharma/] On Thu, Nov 22, 2018 at 11:33 AM Deepak Dixit 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 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 > > > --000000000000235412057b545eaa--