Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
el3ab-Player
Project
Project
Details
Activity
Releases
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
Administrator
el3ab-Player
Commits
ff8fea4f
Commit
ff8fea4f
authored
Jun 15, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: guest profile shows 'ضيف' instead of default DB name
Co-Authored-By:
Claude Opus 4.6
<
noreply@anthropic.com
>
parent
b3c62506
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
auth.php
api/auth.php
+8
-3
No files found.
api/auth.php
View file @
ff8fea4f
...
...
@@ -152,10 +152,15 @@ function handleGuest(): void {
$userId
=
$data
[
'user'
][
'id'
];
//
Create guest profil
e
//
Ensure guest profile has proper display nam
e
$sdb
=
supabaseService
();
$existing
=
$sdb
->
get
(
'profiles'
,
[
'id'
=>
'eq.'
.
$userId
,
'select'
=>
'id'
,
'limit'
=>
1
]);
if
(
empty
(
$existing
)
||
isset
(
$existing
[
'error'
]))
{
$existing
=
$sdb
->
get
(
'profiles'
,
[
'id'
=>
'eq.'
.
$userId
,
'select'
=>
'id,display_name'
,
'limit'
=>
1
]);
if
(
is_array
(
$existing
)
&&
!
isset
(
$existing
[
'error'
])
&&
!
empty
(
$existing
))
{
$current
=
$existing
[
0
];
if
(
!
$current
[
'display_name'
]
||
$current
[
'display_name'
]
===
'لاعب جديد'
||
$current
[
'display_name'
]
===
'Player'
)
{
$sdb
->
update
(
'profiles'
,
[
'display_name'
=>
'ضيف'
,
'username'
=>
'guest_'
.
substr
(
$userId
,
0
,
8
)],
[
'id'
=>
'eq.'
.
$userId
]);
}
}
else
{
$sdb
->
insert
(
'profiles'
,
[
'id'
=>
$userId
,
'display_name'
=>
'ضيف'
,
...
...
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