From d8fe208d06530e43eb1bdee74687ffedd628be98 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 18 Apr 2011 08:32:09 -0700 Subject: [PATCH] rgw: store user info on all indexes in the same format this breaks backward compatibility, we'll have to deal with that later. --- src/rgw/rgw_user.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index baa4cec4f4f2f..fc7a73505a0ff 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -120,16 +120,16 @@ int rgw_store_user_info(RGWUserInfo& info) } } - ret = put_obj(info.user_id, ui_uid_bucket, info.user_id, data, bl.length()); - if (ret < 0) - return ret; - bufferlist uid_bl; RGWUID ui; ui.user_id = info.user_id; ::encode(ui, uid_bl); ::encode(info, uid_bl); + ret = put_obj(info.user_id, ui_uid_bucket, info.user_id, uid_bl.c_str(), uid_bl.length()); + if (ret < 0) + return ret; + if (info.user_email.size()) { ret = put_obj(info.user_id, ui_email_bucket, info.user_email, uid_bl.c_str(), uid_bl.length()); if (ret < 0) -- 2.39.5