From 72859fb5417733a97ebf4fe11d225d02ebc4c21c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 7 Jun 2019 15:13:09 -0700 Subject: truncated oauth_oidc generated username --- rust/src/endpoint_handlers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/src') diff --git a/rust/src/endpoint_handlers.rs b/rust/src/endpoint_handlers.rs index 59bc0519..a44861ee 100644 --- a/rust/src/endpoint_handlers.rs +++ b/rust/src/endpoint_handlers.rs @@ -596,8 +596,8 @@ impl Server { let (editor_row, created): (EditorRow, bool) = match existing.first() { Some((editor, _)) => (editor.clone(), false), None => { - let username = format!("{}-{}", params.preferred_username, params.provider) - .truncate(24); + let mut username = format!("{}-{}", params.preferred_username, params.provider); + username.truncate(24); let editor = Editor { editor_id: None, username: username, -- cgit v1.2.3