fixed userid() extraction