File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ public function toArray(Request $request): array
3636 $ deleteAfter = $ this ->user ->delete_after ;
3737 }
3838
39+ $ statusDesc = $ this ->getStatusDescription ();
40+
41+ // For local accounts, check if email is verified
42+ if ($ this ->local && $ this ->status === 1 && $ this ->user && ! $ this ->user ->email_verified_at ) {
43+ $ statusDesc = 'unverified ' ;
44+ }
45+
3946 return [
4047 'id ' => (string ) $ this ->id ,
4148 'name ' => $ this ->name ?? 'user ' .$ this ->id ,
@@ -53,7 +60,7 @@ public function toArray(Request $request): array
5360 'is_suspended ' => $ this ->is_suspended ,
5461 'is_hidden ' => $ this ->is_hidden ,
5562 'status ' => $ this ->status ,
56- 'status_desc ' => $ this -> getStatusDescription () ,
63+ 'status_desc ' => $ statusDesc ,
5764 'can_upload ' => $ this ->can_upload ,
5865 'can_share ' => $ this ->can_share ,
5966 'can_like ' => $ this ->can_like ,
You can’t perform that action at this time.
0 commit comments