* Save the given user information to storage.
* Returns: 0 on success, -ERR# on failure.
*/
-extern int rgw_store_user_info(RGWRados *store, RGWUserInfo& info, RGWUserInfo *old_info,
- RGWObjVersionTracker *objv_tracker, time_t mtime, bool exclusive);
+extern int rgw_store_user_info(RGWRados *store,
+ RGWUserInfo& info,
+ RGWUserInfo *old_info,
+ RGWObjVersionTracker *objv_tracker,
+ time_t mtime,
+ bool exclusive,
+ map<string, bufferlist> *pattrs = NULL);
+/**
+ * Save the custom user metadata given in @attrs and delete those in @rmattrs
+ * for user specified in @user_id.
+ * Returns: 0 on success, -ERR# on failure.
+ */
+extern int rgw_store_user_attrs(RGWRados *store,
+ string& user_id,
+ map<string, bufferlist>& attrs,
+ map<string, bufferlist>* rmattrs,
+ RGWObjVersionTracker *objv_tracker);
+
/**
- * Given an email, finds the user info associated with it.
+ * Given an user_id, finds the user info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
-extern int rgw_get_user_info_by_uid(RGWRados *store, string& user_id, RGWUserInfo& info,
- RGWObjVersionTracker *objv_tracker = NULL, time_t *pmtime = NULL,
- rgw_cache_entry_info *cache_info = NULL);
+extern int rgw_get_user_info_by_uid(RGWRados *store,
+ string& user_id,
+ RGWUserInfo& info,
+ RGWObjVersionTracker *objv_tracker = NULL,
+ time_t *pmtime = NULL,
+ rgw_cache_entry_info *cache_info = NULL,
+ map<string, bufferlist> *pattrs = NULL);
/**
- * Given an swift username, finds the user info associated with it.
+ * Given an email, finds the user info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
extern int rgw_get_user_info_by_email(RGWRados *store, string& email, RGWUserInfo& info,