Shortly after I wrote my last comment, I managed to trace where this is happening in the router.php.
if ( is_numeric( $user ) ) {
$alias = CBuser::getUserDataInstance( $user )->get( 'alias', null, GetterInterface::STRING );
if ( ! $alias ) {
$alias = CBuser::getUserDataInstance( $user )->get( 'username', null, GetterInterface::STRING );
}
// Ensure the username isn't numeric and that it's alias safe otherwise prefix with user id:
if ( ( ! is_numeric( $alias ) ) && ( $alias == Application::Router()->stringToAlias( $alias ) ) && ( ! in_array( $alias, Application::Router()->getViews() ) ) ) {
$user = $alias;
} else {
$user = $user . '-' . Application::Router()->stringToAlias( $alias );
}
}
The problem is solved by removing the line:
$user = $user . '-' . Application::Router()->stringToAlias( $alias );
However, I am absolutely against hacking 3rd party code, so can you provide a slight change in your router.php, to allow for the username to be removed and only the userid to be exposed, in the URL.