MDL-41025 moodlelib: addressed todo on truncate_userinfo