This commit is contained in:
parent
b6035fbbdf
commit
d9fba50606
@ -2111,11 +2111,15 @@ impl LoginConfigHandler {
|
|||||||
};
|
};
|
||||||
let mut display_name = get_buildin_option(config::keys::OPTION_DISPLAY_NAME);
|
let mut display_name = get_buildin_option(config::keys::OPTION_DISPLAY_NAME);
|
||||||
if display_name.is_empty() {
|
if display_name.is_empty() {
|
||||||
display_name = serde_json::from_str::<HashMap<String, String>>(
|
display_name =
|
||||||
&LocalConfig::get_option("user_info"),
|
serde_json::from_str::<serde_json::Value>(&LocalConfig::get_option("user_info"))
|
||||||
)
|
.map(|x| {
|
||||||
.map(|mut x| x.remove("name").unwrap_or_default())
|
x.get("name")
|
||||||
.unwrap_or_default();
|
.map(|x| x.as_str().unwrap_or_default())
|
||||||
|
.unwrap_or_default()
|
||||||
|
.to_owned()
|
||||||
|
})
|
||||||
|
.unwrap_or_default();
|
||||||
}
|
}
|
||||||
if display_name.is_empty() {
|
if display_name.is_empty() {
|
||||||
display_name = crate::username();
|
display_name = crate::username();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user