How to retreive the UserID from a member page URL

@yvesblache create a js file named routers.js in the backend root directory (if not already exists).
Put this line at the top:

import { currentMember } from 'wix-members-backend';

Create pageName__beforeRouter function, inside this function query for the current member, compare its ._id property value to the request.path and if they are not equal use the forbidden module. or redirect to whatever page you like.