The subuser_get_parent function is returning the same uid as was passed in to the function. The issue is the the SQL query. It is currently
return db_result(db_query("SELECT uid FROM {subuser_relationship} WHERE uid = %d", $uid));
but I think it should be
return db_result(db_query("SELECT parent_id FROM {subuser_relationship} WHERE uid = %d", $uid));
Comments
Comment #1
blakehall commentedYou're absolutely right, I've pushed a fix for this to the 6.x-1.x branch.
Thanks!