diff --git a/docs/src/administration_configuration.md b/docs/src/administration_configuration.md index cfda34f75..48e32fddf 100644 --- a/docs/src/administration_configuration.md +++ b/docs/src/administration_configuration.md @@ -4,8 +4,8 @@ The configuration is based on the file [defaults.hjson](https://yerbamate.dev/Le The `defaults.hjson` and `config.hjson` files are located at `config/defaults.hjson` and`config/config.hjson`, respectively. To change these default locations, you can set these two environment variables: - LEMMY_CONFIG_LOCATION # config.hjson - LEMMY_CONFIG_DEFAULTS_LOCATION # defaults.hjson +- LEMMY_CONFIG_LOCATION # config.hjson +- LEMMY_CONFIG_DEFAULTS_LOCATION # defaults.hjson Additionally, you can override any config files with environment variables. These have the same name as the config options, and are prefixed with `LEMMY_`. For example, you can override the `database.password` with `LEMMY_DATABASE__POOL_SIZE=10`. diff --git a/lemmy_api/src/user.rs b/lemmy_api/src/user.rs index 1d5aa19a2..ad3d98087 100644 --- a/lemmy_api/src/user.rs +++ b/lemmy_api/src/user.rs @@ -493,12 +493,14 @@ impl Perform for GetUserDetails { // if there's a logged in user and it's the same id as the user whose details are being // requested we need to use get_user_dangerous so it returns their email or other sensitive // data hidden when viewing users other than yourself - Some(auth_user_id) => if user_details_id == auth_user_id { - UserView::get_user_dangerous(conn, auth_user_id) - } else { - UserView::get_user_secure(conn, user_details_id) + Some(auth_user_id) => { + if user_details_id == auth_user_id { + UserView::get_user_dangerous(conn, auth_user_id) + } else { + UserView::get_user_secure(conn, user_details_id) + } } - None => UserView::get_user_secure(conn, user_details_id) + None => UserView::get_user_secure(conn, user_details_id), } };