Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8904231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:04:32+00:00 2026-06-15T02:04:32+00:00

Our application is using Symfony 2.0 and MongoDB with FOSUserBundle for user management. Client

  • 0

Our application is using Symfony 2.0 and MongoDB with FOSUserBundle for user management.

Client wants to prevent login with the same username from different device at the same time in their application.

Our idea is to invalidate/delete all other sessions for the same user when the successful login occurs.

The problem is, that we cannot save session in DB, because Mongo Session handler was added later in the version 2.1.

The only solution we come up with is to iterate over the session files saved in file-system and check if the username of the user is saved in that file. If that is true, we just delete the file and login session on other locations are terminated. Of course we have to check that we don’t delete the current session also.

Does anyone have a better idea how the problem could be solved?
If not, are there any hidden traps that we should know about?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:04:35+00:00Added an answer on June 15, 2026 at 2:04 am

    You could add an IP address column to the user entity that stores the current user’s IP upon login. On each page load (via an event listener), you could check the IP stored in the DB against the IP of the person requesting the page. If the IP in the DB doesn’t match the current user’s IP (someone logged in from another location), log them out.

    To take it a step further, via ajax, you could make a call to the server every X seconds that performs the same type of check, and do a redirect to log the user out if the ajax request returns a bad match.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application downloads data from the internet using RSS but is having connection problems
We have an ASMX web service which we invoke from our ASP.NET application using
We have a client server hosting our web application using Apache 2.2 & Tomcat
We need to send email from our desktop application using C# 3.5 . The
So we have our J2EE application using Log4j like this public class CustomerController {
I'm not a fan of using ASP.NET session state, but our application is using
Our application is developed using Spring framework. Is it good practice to check null
In our application we are using set of images as slides. If we click
Goal : Our application is built using multiple types (e.g. Person, PersonSite(ICollection), Site -
I am developing a PHP application using our XAMPP setup as a test server.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.