SELECT id FROM res_users WHERE login = %(login)s LIMIT 1;