> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: getCurrentMember(options: GetCurrentMemberOptions) # Method package: wixMembersV2 # Method menu location: wixMembersV2 --> members --> getCurrentMember # Method Link: https://dev.wix.com/docs/velo/apis/wix-members-v2/members/get-current-member.md # Method Description: Retrieves the currently logged-in member. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get currently logged in member (export from backend code) ```javascript import { members } from 'wix-members.v2'; import { webMethod, Permissions } from 'wix-web-module'; /* Sample options value: * { * fieldsets: [ 'FULL' ] * } */ export const myGetCurrentMemberFunction = webMethod( Permissions.Anyone, async () => { try { const member = await members.getCurrentMember(); console.log('Retrieved currently logged in member:', member); return member; } catch (error) { console.error(error); // Handle the error } } ); /* Promise resolves to: * * { * "_createdDate": "2024-02-22T13:52:00.000Z", * "_id": "7d368843-6f0c-4037-8d0e-b7e36a8a0c32", * "_updatedDate": "2024-02-22T13:52:00.674Z", * "activityStatus": "UNKNOWN", * "contactId": "ff20c02e-3d13-4412-9529-d628aa0abc12", * "privacyStatus": "UNKNOWN", * "profile": { * "nickname": "Maverick", * "slug": "maverick123", * "photo": { * "url": "https://example.com/photo.jpg", * "height": 0, * "width": 0, * "_id": "" * } * }, * "status": "UNKNOWN" * } * */ ``` ## Get currently logged in member (dashboard page code) ```javascript import { members } from 'wix-members.v2'; /* Sample options value: * { * fieldsets: [ 'FULL' ] * } */ export async function myGetCurrentMemberFunction(options){ try { const member = await members.getCurrentMember(); console.log('Retrieved currently logged in member:', member); return member; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * * { * "_createdDate": "2024-02-22T13:52:00.000Z", * "_id": "7d368843-6f0c-4037-8d0e-b7e36a8a0c32", * "_updatedDate": "2024-02-22T13:52:00.674Z", * "activityStatus": "UNKNOWN", * "contactId": "ff20c02e-3d13-4412-9529-d628aa0abc12", * "privacyStatus": "UNKNOWN", * "profile": { * "nickname": "Maverick", * "slug": "maverick123", * "photo": { * "url": "https://example.com/photo.jpg", * "height": 0, * "width": 0, * "_id": "" * } * }, * "status": "UNKNOWN" * } * */ ``` ---