{
bool found = false;
std::string swift_user;
- rgw_user& uid = op_state.get_user_id();
+ user_id = op_state.get_user_id();
std::string user_email = op_state.get_user_email();
std::string access_key = op_state.get_access_key();
std::string subuser = op_state.get_subuser();
clear_populated();
- if (uid.empty() && !subuser.empty()) {
+ if (user_id.empty() && !subuser.empty()) {
size_t pos = subuser.find(':');
if (pos != string::npos) {
- uid = subuser.substr(0, pos);
- op_state.set_user_id(uid);
+ user_id = subuser.substr(0, pos);
+ op_state.set_user_id(user_id);
}
}
- if (!uid.empty() && (uid.compare(RGW_USER_ANON_ID) != 0)) {
- found = (rgw_get_user_info_by_uid(store, uid, user_info, &op_state.objv) >= 0);
+ if (!user_id.empty() && (user_id.compare(RGW_USER_ANON_ID) != 0)) {
+ found = (rgw_get_user_info_by_uid(store, user_id, user_info, &op_state.objv) >= 0);
op_state.found_by_uid = found;
}
if (!user_email.empty() && !found) {
set_populated();
}
- user_id = user_info.user_id;
+ if (user_id.empty()) {
+ user_id = user_info.user_id;
+ }
op_state.set_initialized();
// this may have been called by a helper object