Well no, you do not need userid, you need username because IDs normally mismatch.
You want that if an user click into a profile url that isn't his own profile, to view another user profile, then phpBB url profile of this user should be provided.
may a db call to phpBB done when a profile url clicked in wordpress (js event listener) then an ajax call will fire to execute the query, retrieve uid in phpBB, return value, and build url to point to phpBB (that need to contain id).
This is maybe the wordpress side way.
But you could do the same passing to phpBB the username, that would be also more easy to do.
Normal phpBB profile url look like this:
Code: Select all
https://www.axew3.com/w3/forums/memberlist.php?mode=viewprofile&u=390
Let say that in wordpress you edit wp profile urls to point to something like this:
Code: Select all
https://www.axew3.com/w3/forums/memberlist.php?mode=viewprofile&uname=anUsername
Then on top of phpBB
viewprofile.php if you're wild, or via a phpBB mod:
On top of the file, you could $_GET the var
uname, sanitize, and execute a query to check the phpBB id of this username, then build the url to phpBB profile adding the user id, stop code execution, reload page to correct phpBB user profile.
I will consider to add the wordpress way as soon into plugin.