how to force logged in user to logout (kill his session forcefully) | Bytes (2024)

Home Posts Topics Members FAQ

mritunjay82

how to force logged in user to logout (kill his session forcefully) | Bytes (1) 3 New Member

If any user is deleted from admin section and is still logged in he can keep on doing things on my website that need to be logged in.

I want to kill this users session.

The only possible way I know is to put his userId in db table and check on each page request if user is desired one. If it is, just clear his session. But this is not at all food approach as it is very seldom situation.

Please help with some server level way to kill session from admin.

Sep 25 '07 #1

Subscribe Reply

4 how to force logged in user to logout (kill his session forcefully) | Bytes (2) 8772 how to force logged in user to logout (kill his session forcefully) | Bytes (3)

ak1dnar

1,584 how to force logged in user to logout (kill his session forcefully) | Bytes (5) Recognized Expert Top Contributor

Best way to do this is, matching the logged in user id with the corresponding table records. with each page request.

Sep 25 '07 #2

reply

mritunjay82

3 how to force logged in user to logout (kill his session forcefully) | Bytes (6) New Member

But I dont want to do that as I have to check for that user in some deleted table each time he comes to any page. Is there any other way.

Sep 27 '07 #3

reply

mritunjay82

3 how to force logged in user to logout (kill his session forcefully) | Bytes (7) New Member

I got another way. When user log in, save his sessionId in db table and while deleting user, delete file sess_<sessionid > from folder where sessions are stored by apache/php [U will get path from phpinfo()]. But the problem is that apache is not allowing to delete that file. trying to get through that

Sep 28 '07 #4

reply

karthickRAJKUMAR

46 how to force logged in user to logout (kill his session forcefully) | Bytes (9) New Member

store the value in session variable which in the database and destroy the session when the user click logout

Sep 28 '07 #5

reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 17265

Check if user is already logged in

by: fr? |last post by:

Hi, i have a website , on wich users have to log in credentials are checked against mysql db some session vars are set during login for use somewhere else in the code. Is there a way to prohibit a user to log in twice. A was thinking about setting some flag in the db, but in that case i need some timeout in case a pc can crash for...

PHP

15 7638

Best way to remember a logged in user

by: Joshua Beall |last post by:

Hi All, What is the best way to use a cookie to remember a logged in user? Would you store the username and password in two separate cookies? Should the password be plain text? Hashed? Not there at all? Any feedback would be helpful. Thanks! -Josh

PHP

4 3245

Monitoring logged-in users with sessions: autologoff

by: vesely |last post by:

Hi all, I'm currently relying on logged-in users hitting "logout" (logoff) before they leave, in order to terminate the session. With PHP the session filename is in a cookie that lasts for the current session. The problem is that the server does not know when the current session expires. (I have quite long timeouts.) Did anybody attempt...

PHP

8 1850

Displaying all logged on users

by: Vince Varallo |last post by:

Hello All, I would like to display all logged on users on a web page. I store each user's name in a session varible, but I don't seem to be able to loop through a sessions collection to view all sessions. Has anyone else figured this out? Thanks in advance, Vince

ASP.NET

4 4985

Force logout on machine1 when user logged into another machine

by: Chumma Dede |last post by:

Hi, Is there any way in asp.net 1.1 to force a user to logout from an existing session on machine1, if that same userid logs in with a new session on another machine, say machine2? We are using a web garden having two web servers with network load balancing, along with a asp.net session state server which the web apps on both the servers...

ASP.NET

3 4270

Force Users to log out.

by: Andy_Khosravi |last post by:

I have a method in place in my application to force users out. It's a simple tactic I got from these newsgroups where you create a table with one record called logout, then check that field with a timer on a form that doesn't close. If it's checked, it starts a forced logout sequence. Works fine 99% of the time (unless somebody is in the...

Microsoft Access / VBA

1 3282

How to change the login hyper link to logout when successfully logged in

by: Adrock952 |last post by:

I have a link on my site which obviously says "Login" where users log in. I would like that link to be changed to "Logout" when the user has successfully logged in and the session has been created and when the user logs out, i would like the link changed back to "Login" without having to refresh the page. here is my login page <?php if...

Javascript

6 5965

Simple force session logout time on leave page

by: Thiago Macedo |last post by:

I could not find on the web a complete solution for this task. This is not the perfect solution, because it's doesn't have the ability to log the logout if browser crash or user leave it open while the session time out expires. So, any improvement would be apreciated. 1. Make the system frameable, by creating a frameset page with an...

PHP

7527

What is ONU?

by: marktang |last post by:

ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...

General

1 7485

The easy way to turn off automatic updates for Windows 10/11

by: Hystou |last post by:

Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...

Windows Server

7819

Discussion: How does Zigbee compare with other wireless protocols in smart home applications?

by: tracyyun |last post by:

Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...

General

6052

AI Job Threat for Devs

by: agi2029 |last post by:

Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...

Career Advice

5097

Couldn’t get equations in html when convert word .docx file to html file in C#.

by: conductexam |last post by:

I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...

C# / C Sharp

3505

Trying to create a lan-to-lan vpn between two differents networks

by: TSSRALBI |last post by:

Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...

Networking - Hardware / Configuration

1 1953

transfer the data from one system to another through ip address

by: 6302768590 |last post by:

Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

C# / C Sharp

1 1064

How to add payments to a PHP MySQL app.

by: muto222 |last post by:

How can i add a mobile payment intergratation into php mysql website.

PHP

772

Comprehensive Guide to Website Development in Toronto: Expert Insights from BSMN Consultancy

by: bsmnconsultancy |last post by:

In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

General

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisem*nts and analytics tracking please visit the page.

how to force logged in user to logout (kill his session forcefully) | Bytes (2024)

References

Top Articles
Latest Posts
Article information

Author: Dr. Pierre Goyette

Last Updated:

Views: 5645

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Dr. Pierre Goyette

Birthday: 1998-01-29

Address: Apt. 611 3357 Yong Plain, West Audra, IL 70053

Phone: +5819954278378

Job: Construction Director

Hobby: Embroidery, Creative writing, Shopping, Driving, Stand-up comedy, Coffee roasting, Scrapbooking

Introduction: My name is Dr. Pierre Goyette, I am a enchanting, powerful, jolly, rich, graceful, colorful, zany person who loves writing and wants to share my knowledge and understanding with you.