aboutsummaryrefslogtreecommitdiffstats
path: root/src/controllers/login_controller.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/controllers/login_controller.rs')
-rw-r--r--src/controllers/login_controller.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/controllers/login_controller.rs b/src/controllers/login_controller.rs
index 8800c59..02c8ec2 100644
--- a/src/controllers/login_controller.rs
+++ b/src/controllers/login_controller.rs
@@ -35,10 +35,7 @@ pub fn create(login: Form<LoginForm>, conn: DbConn) -> Flash<Redirect> {
if user.password == login.password {
return Flash::success(
Redirect::to("/"),
- format!(
- "{} logged in successfully",
- user.realname.or(Some(user.username)).unwrap()
- ),
+ format!("{} logged in successfully", user.displayname()),
);
}
}