File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,21 +57,23 @@ public function mount(string $id)
5757 {
5858 $ this ->user = User::getUserWithSocialAccount ($ id )->first ();
5959
60- if ($ this ->user ) {
61- if ($ this ->user ->id == Auth::user ()->id ) {
62- return $ this ->redirectRoute ('profile ' , navigate: true );
63- }
60+ if (!$ this ->user ) {
61+ abort (404 );
62+ }
6463
65- $ this ->name = $ this ->user ->name ;
64+ if ($ this ->user ->id == Auth::user ()->id ) {
65+ return $ this ->redirectRoute ('profile ' , navigate: true );
66+ }
6667
67- $ this ->username = $ this ->user ->username ;
68+ $ this ->name = $ this ->user ->name ;
6869
69- $ this ->email = $ this ->user ->email ;
70+ $ this ->username = $ this ->user ->username ;
7071
71- $ this ->socials_google = $ this ->user ->socialAccounts ()-> where ( ' provider ' , ' google ' )-> first () ;
72+ $ this ->email = $ this ->user ->email ;
7273
73- $ this ->socials_github = $ this ->user ->socialAccounts ()->where ('provider ' , 'github ' )->first ();
74- }
74+ $ this ->socials_google = $ this ->user ->socialAccounts ()->where ('provider ' , 'google ' )->first ();
75+
76+ $ this ->socials_github = $ this ->user ->socialAccounts ()->where ('provider ' , 'github ' )->first ();
7577
7678 $ this ->canManageTwoFactor = Features::canManageTwoFactorAuthentication ();
7779
You can’t perform that action at this time.
0 commit comments