rimap.lua: add function for direct getting user tasks with locking