From: Timo Sirainen Date: Sat, 7 Jan 2023 20:31:41 +0000 (+0200) Subject: lib-storage: Add mail_storage_service_user_get_userdb_fields() X-Git-Tag: 2.4.0~2315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f02d6f8df206319d1e757b727018cd941bbebfe9;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Add mail_storage_service_user_get_userdb_fields() --- diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index a071a57b38..bf782a1f26 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -1664,6 +1664,12 @@ void mail_storage_service_user_unref(struct mail_storage_service_user **_user) pool_unref(&user->pool); } +const char *const * +mail_storage_service_user_get_userdb_fields(struct mail_storage_service_user *user) +{ + return user->input.userdb_fields; +} + void mail_storage_service_init_settings(struct mail_storage_service_ctx *ctx, const struct mail_storage_service_input *input) { diff --git a/src/lib-storage/mail-storage-service.h b/src/lib-storage/mail-storage-service.h index 597a025a05..9dfefdf59a 100644 --- a/src/lib-storage/mail-storage-service.h +++ b/src/lib-storage/mail-storage-service.h @@ -129,6 +129,9 @@ int mail_storage_service_lookup_next(struct mail_storage_service_ctx *ctx, const char **error_r); void mail_storage_service_user_ref(struct mail_storage_service_user *user); void mail_storage_service_user_unref(struct mail_storage_service_user **user); +/* Return userdb fields for the user. */ +const char *const * +mail_storage_service_user_get_userdb_fields(struct mail_storage_service_user *user); /* Initialize iterating through all users. */ void mail_storage_service_all_init(struct mail_storage_service_ctx *ctx); /* Initialize iterating through all users with a user mask hint to the