X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/624f31fdf2c7726745dbfc53b7a16be6ff715023..cd0bf130b165970760884e279bb4301d3f6946ca:/projects/stargazer/user_impl.cpp?ds=inline diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index 25bfe526..f15b182a 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -1511,17 +1511,18 @@ while (it != messages.end()) //----------------------------------------------------------------------------- std::string USER_IMPL::GetParamValue(const std::string & name) const { - if (ToLower(name) == "id") + std::string lowerName = ToLower(name); + if (lowerName == "id") { std::ostringstream stream; stream << id; return stream.str(); } - if (ToLower(name) == "login") return login; - if (ToLower(name) == "currip") return currIP.ToString(); - if (ToLower(name) == "enableddirs") return GetEnabledDirs(); - if (property.Exists(name)) - return property.GetPropertyValue(name); + if (lowerName == "login") return login; + if (lowerName == "currip") return currIP.ToString(); + if (lowerName == "enableddirs") return GetEnabledDirs(); + if (property.Exists(lowerName)) + return property.GetPropertyValue(lowerName); else { WriteServLog("User’s parameter '%s' does not exist.", name.c_str());