mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-30 15:30:51 -05:00
refactor: swap auth()->user()->id to auth()->id()
This commit is contained in:
@@ -93,7 +93,7 @@ class Comment extends Component
|
||||
|
||||
final public function editComment(): void
|
||||
{
|
||||
if (auth()->user()->id == $this->comment->user_id || auth()->user()->group->is_modo) {
|
||||
if (auth()->id() == $this->comment->user_id || auth()->user()->group->is_modo) {
|
||||
$this->comment->update((new AntiXSS())->xss_clean($this->editState));
|
||||
$this->isEditing = false;
|
||||
} else {
|
||||
@@ -103,7 +103,7 @@ class Comment extends Component
|
||||
|
||||
final public function deleteComment(): void
|
||||
{
|
||||
if (auth()->user()->id == $this->comment->user_id || auth()->user()->group->is_modo) {
|
||||
if (auth()->id() == $this->comment->user_id || auth()->user()->group->is_modo) {
|
||||
$this->comment->delete();
|
||||
$this->emitUp('refresh');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user