How to dynamically get current user list by using session?
See original GitHub issueHi Miguel, I’m a junior developer, I’m sorry to make you spend some time on this question…
- I’m using Flask-SocketIO to try to build a chat server without using any database or user list stored in the back-end.
- I just simply store the username into
session
and authenticate the username info byFlask-Login
, so that I can use SocketIO to get thecurrent_user
.
So here is the question:
How could I get the current user list by dynamically retrieving the session
s from different users, in order to let every user who has logged in see the list?
Thank you for reading this, I would appreciate it if you could give me some handy tips 😃😃😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
Using the Dynamic PowerShell to Get Current Users
Learn how use PowerShell to get current users in this step-by-step tutorial walking you through how to do so many different ways!
Read more >How to dynamically display user name from the database after ...
<?php $user = User::find_by_id($_SESSION['user_id']); ?> Note: To make your templating cleaner, you can use the shorthand syntax for echo :
Read more >Get the currently logged in user id (generating dynamic url ...
I want to add a property based on currently logged in user id or just help me to access the currently logged-in user...
Read more >Solved: Get executing user in Flow - Power Platform Community
Solved: I need to send email to the user who executed the flow on a selected item in document library. I am using...
Read more >How to display logged in user information in PHP
Explanation: The session is started using session_start() method. After that, the variables are declared and an error array is created. It will ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Example:
This sends the user as an argument to your thread function (you’ll have to add the argument on your thread function, obviously). It also stores the thread in the user session, so that you can then access it when you need to stop it.
It works! Thank you for your help! I feel extremely excited now! It’s really a nice idea to store the thread into the session, I never thought about it before! @miguelgrinberg