What I am doing as the workaround (unsafe):
function q2apro_gethandle_from_url() {
$handle = preg_replace( '#^user/([^/]+)#', "$1", $this->request );
// remove /questions from $handle
$handle = str_replace('/questions', '', $handle);
// remove /answers from $handle
$handle = str_replace('/answers', '', $handle);
return $handle;
}