The reproduced steps are complex. However, just from the code itself, I think the error is not hard to be found. The point is, if "request.remote_user" is not None but user.get('name') is None, then the last statement "return (user['id'], user['name'])" will raise a KeyError.
The reproduced steps are complex. However, just from the code itself, I think the error is not hard to be found. The point is, if "request. remote_ user" is not None but user.get('name') is None, then the last statement "return (user['id'], user['name'])" will raise a KeyError.