Couple bugs in the code provided: 1. Remove the end of line character ';' in the FOR loop, just before the LOOP. 2. The cursor referenced in the for loop doesn't match the declaration above. Replace user_tabs_cur with ut_cur.
Seems to work after those adjustments... Where is this code coming from anyway? Doesn't look like it gets tested very well, so be cautious with what you get here!