X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/624f31fdf2c7726745dbfc53b7a16be6ff715023..3765465f3e8383a929a066a3f0d2fc5dd91fa64a:/projects/stargazer/user_impl.cpp?ds=sidebyside 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());