File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/payload/src/auth/operations Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ export const meOperation = async (args: Arguments): Promise<MeOperationResult> =
3838 }
3939
4040 if ( req . user ) {
41+ if ( req . user . collection !== collection . config . slug ) {
42+ return {
43+ user : null ! ,
44+ }
45+ }
46+
4147 const { pathname } = req
4248 const isGraphQL = pathname === `/api${ req . payload . config . routes . graphQL } `
4349
@@ -59,12 +65,6 @@ export const meOperation = async (args: Arguments): Promise<MeOperationResult> =
5965 user . _strategy = req . user . _strategy
6066 }
6167
62- if ( req . user . collection !== collection . config . slug ) {
63- return {
64- user : null ! ,
65- }
66- }
67-
6868 // /////////////////////////////////////
6969 // me hook - Collection
7070 // /////////////////////////////////////
You can’t perform that action at this time.
0 commit comments