Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
V
vidai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
vidai
Commits
5c1c889b
Commit
5c1c889b
authored
Oct 08, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure user data is always fresh from database to reflect avatar changes immediately
parent
ef456d30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
utils.py
vidai/utils.py
+17
-10
No files found.
vidai/utils.py
View file @
5c1c889b
...
...
@@ -27,7 +27,14 @@ def get_current_user_session():
session_id
=
session
.
get
(
'session_id'
)
if
session_id
:
user
=
get_current_user
(
session_id
)
if
user
and
user
.
get
(
'email'
):
if
user
:
# Always get fresh user data from database to ensure avatar updates are reflected
from
.database
import
get_user_by_id
fresh_user
=
get_user_by_id
(
user
[
'id'
])
if
fresh_user
:
user
.
update
(
fresh_user
)
if
user
.
get
(
'email'
):
import
hashlib
import
time
email_hash
=
hashlib
.
md5
(
user
[
'email'
]
.
lower
()
.
encode
())
.
hexdigest
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment