Minor variable name changes, and a change to the user_access SQL query.