diff --git a/app/Http/Controllers/Auth/DiscordAuthController.php b/app/Http/Controllers/Auth/DiscordAuthController.php
index 1a869a4..fc30acf 100644
--- a/app/Http/Controllers/Auth/DiscordAuthController.php
+++ b/app/Http/Controllers/Auth/DiscordAuthController.php
@@ -31,14 +31,13 @@ class DiscordAuthController extends Controller
$user = User::where('discord_id', $discordUser->id)->first();
- if (! $user) {
+ if (!$user) {
// link by email if it already exists
$user = User::where('email', $discordUser->email)->first();
if ($user) {
$user->update([
'discord_id' => $discordUser->id,
- 'discord_name' => $discordUser->nickname ?? $discordUser->name,
'discord_avatar' => $discordUser->avatar,
]);
} else {
@@ -47,7 +46,6 @@ class DiscordAuthController extends Controller
'name' => $discordUser->name,
'email' => $discordUser->email,
'discord_id' => $discordUser->id,
- 'discord_name' => $discordUser->nickname ?? $discordUser->name,
'discord_avatar' => $discordUser->avatar,
'password' => bcrypt(Str::random(40)),
]);
diff --git a/app/Livewire/AdminUserSearch.php b/app/Livewire/AdminUserSearch.php
index 36e18e9..b4b15c1 100644
--- a/app/Livewire/AdminUserSearch.php
+++ b/app/Livewire/AdminUserSearch.php
@@ -43,10 +43,7 @@ class AdminUserSearch extends Component
$users = User::when($this->filtered !== [], fn ($query) => $query->where('id', '>=', 10000))
->when($this->patreon !== [], fn ($query) => $query->where('is_patreon', 1))
->when($this->banned !== [], fn ($query) => $query->where('is_banned', 1))
- ->when($this->search !== '', fn ($query) => $query->where(function($query) {
- $query->where('name', 'like', '%'.$this->search.'%')
- ->orWhere('discord_name', 'like', '%'.$this->search.'%');
- }))
+ ->when($this->search !== '', fn ($query) => $query->where('name', 'like', '%'.$this->search.'%'))
->paginate(20);
return view('livewire.admin-user-search', [
diff --git a/app/Models/User.php b/app/Models/User.php
index 9fd5cfb..37d6ac4 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -29,7 +29,6 @@ class User extends Authenticatable
'is_banned',
// Discord
'discord_id',
- 'discord_name',
'discord_avatar',
];
@@ -60,26 +59,9 @@ class User extends Authenticatable
'tag_blacklist' => 'array',
// Discord
'discord_id' => 'integer',
- 'discord_name' => 'string',
'discord_avatar' => 'string',
];
- /**
- * Get the user name
- */
- public function getUserName(): string
- {
- if (!$this->discord_name) {
- return $this->name;
- }
-
- if ($this->discord_name == $this->name)
- {
- return $this->name;
- }
-
- return "{$this->name} ({$this->discord_name})";
- }
/**
* Has Many Playlists.
diff --git a/app/Override/Comments/CommentService.php b/app/Override/Comments/CommentService.php
index 3b47f3c..72cb389 100644
--- a/app/Override/Comments/CommentService.php
+++ b/app/Override/Comments/CommentService.php
@@ -122,12 +122,11 @@ class CommentService
$url = '/hentai/' . $episode->slug . '#comment-' . $reply->id;
$user = Auth::user();
- $username = $user->discord_name ?? $user->name;
$parentCommentUser = User::where('id', $comment->commenter_id)->firstOrFail();
$parentCommentUser->notify(
new CommentNotification(
- "{$username} replied to your comment.",
+ "{$user->name} replied to your comment.",
Str::limit($reply->comment, 50),
$url
)
diff --git a/database/migrations/2026_01_06_161620_fix_discord_oauth_system.php b/database/migrations/2026_01_06_161620_fix_discord_oauth_system.php
index 4d69195..d436f11 100644
--- a/database/migrations/2026_01_06_161620_fix_discord_oauth_system.php
+++ b/database/migrations/2026_01_06_161620_fix_discord_oauth_system.php
@@ -26,14 +26,16 @@ return new class extends Migration
$table->dropColumn('public_flags');
$table->dropColumn('verified');
$table->dropColumn('mfa_enabled');
+ $table->dropColumn('global_name');
+ $table->dropColumn('locale');
});
// Change & Add Columns
Schema::table('users', function (Blueprint $table) {
// Rename
$table->renameColumn('username', 'name');
- $table->renameColumn('global_name', 'discord_name');
$table->renameColumn('avatar', 'discord_avatar');
+ $table->string('avatar')->nullable()->after('email');
// Re-Add Email verification
$table->timestamp('email_verified_at')->nullable()->after('email');
diff --git a/resources/views/layouts/navigation.blade.php b/resources/views/layouts/navigation.blade.php
index ddf17f1..c33ad5d 100644
--- a/resources/views/layouts/navigation.blade.php
+++ b/resources/views/layouts/navigation.blade.php
@@ -97,7 +97,7 @@
@if (Auth::user()->discord_avatar)
+ alt="{{ Auth::user()->name }}" />
@endif
@else
- {{ Auth::user()->getUserName() }}
+ {{ Auth::user()->name }}
@if ($notAvailable)
@endif
@@ -234,7 +234,7 @@
@if (Auth::user()->discord_avatar)
+ alt="{{ Auth::user()->name }}" />
@else
diff --git a/resources/views/livewire/admin-user-search.blade.php b/resources/views/livewire/admin-user-search.blade.php
index a9ebe62..5c5afc3 100644
--- a/resources/views/livewire/admin-user-search.blade.php
+++ b/resources/views/livewire/admin-user-search.blade.php
@@ -60,7 +60,7 @@
{{ $user->id }}
- {{ $playlist->user->discord_name ?? $playlist->user->name }} • {{ $currentIndex + 1 }}/{{ $episodeCount }} Episodes + {{ $playlist->user->name }} • {{ $currentIndex + 1 }}/{{ $episodeCount }} Episodes