> 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: joinCommunity() # Method package: wixMembersV2 # Method menu location: wixMembersV2 --> members --> joinCommunity # Method Link: https://dev.wix.com/docs/velo/apis/wix-members-v2/members/join-community.md # Method Description: Joins the currently logged-in member to the site community and sets their profile to public. When a member's profile is public, they have access to the site's [Members Area](https://support.wix.com/en/article/about-members-area) features — such as chat, forum, and followers — and their profile is visible to other members and site visitors. > **Note:** > Only logged-in members can call this function without elevated permissions. > To call this function as a different identity, [elevated permissions](https://www.wix.com/velo/reference/wix-auth/elevate) are required. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Make currently logged-in member's profile public (export from backend code) ```javascript import { members } from 'wix-members.v2'; import { webMethod, Permissions } from 'wix-web-module'; export const myJoinCommunityFunction = webMethod( Permissions.Anyone, async () => { try { const member = await members.joinCommunity(); console.log('Joined site community:', member); return member; } catch (error) { console.error(error); // Handle the error } } ); /* Promise resolves to: * { * "member": { * "createdDate": "2024-02-22T13:52:00Z", * "id": "7d368843-6f0c-4037-8d0e-b7e36a8a0c32", * "updatedDate": "2024-02-22T13:52:00.674Z", * "activityStatus": "ACTIVE", * "contact": { * "contactId": "ff20c02e-3d13-4412-9529-d628aa0abc12", * "firstName": "John", * "lastName": "Doe", * "phones": [], * "emails": [], * "addresses": [], * "customFields": {} * }, * "contactId": "ff20c02e-3d13-4412-9529-d628aa0abc12", * "lastLoginDate": "2024-02-29T11:40:21Z", * "loginEmail": "johndoe@example.com", * "loginEmailVerified": true, * "privacyStatus": "PUBLIC", * "profile": { * "nickname": "John Doe", * "slug": "johndoe", * "photo": { * "id": "", * "url": "https://example.com/newphoto.jpg", * "height": 0, * "width": 0 * } * }, * "status": "APPROVED" * } * } */ ``` ## Make the currently logged-in member's profile public (Dashboard page code) ```javascript import { members } from 'wix-members.v2'; export async function myJoinCommunityFunction(){ try { const member = await members.joinCommunity(); console.log('Joined site community:', member); return member; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * { * "_id": "f32cbc51-a331-442b-86c2-2c664613e8b9", * "_createdDate": "2021-08-02T23:14:42.000Z", * "_updatedDate": "2021-08-02T23:14:58.345Z", * "lastLoginDate": "2021-08-04T11:02:44.000Z", * "contactId": "f32cbc51-a331-442b-86c2-2c664613e8b9", * "loginEmail": "claude.morales@example.com", * "loginEmailVerified": true, * "status": "APPROVED", * "privacyStatus": "PUBLIC", * "activityStatus": "ACTIVE", * "contact": { * "firstName": "Claude", * "lastName": "Morales", * "phones": [ * "0747-769-460" * ], * "emails": [ * "claude.morales@example.com" * ], * "addresses": [ * { * "_id": "f0f4d905-488d-44db-9080-fc29078cfad5", * "addressLine": "9373 Park Avenue", * "addressLine2": "Berkshire", * "city": "Ely", * "subdivision": "GB-ENG", * "country": "GB", * "postalCode": "PD50 8EU" * } * ], * "customFields": {} * }, * "profile": { * "nickname": "Claude Morales", * "slug": "claudemorales" * } * } */ ``` ---