return TRUE;
}
- request->userdb_reply = auth_fields_init(request->pool);
+ /* We want to preserve any userdb fields set by the earlier passdb
+ lookup, so initialize userdb_reply only if it doesn't exist.
+ Don't use auth_request_init_userdb_reply(), because the entire
+ userdb part of the result comes from the cache so we don't want to
+ initialize it with default_fields. */
+ if (request->userdb_reply == NULL)
+ request->userdb_reply = auth_fields_init(request->pool);
auth_request_userdb_import(request, value);
*result_r = USERDB_RESULT_OK;
return TRUE;