Basically i just need a variable which can tell me what my url is - even if it changes. And then i need to make a selection on that, because then i can only show data for that users, cause the URL is unique.
I understand what you're trying to do but I don't think there's a good way of natively grabbing the URL and it feels like it could be easily exploited if someone changes the name in the URL for example.
It sounds like using web tickets for authentication might be more up to the task. See more info here: