Commit 69690da6 authored by Yves Arrouye's avatar Yves Arrouye Committed by Commit Bot

Use the primary user email as the username on Chrome OS

This is a more accurate representation of who the user is than just
the non-domain part of the email.

Bug: chromium:1859676
Test: manual
Change-Id: I7c63294a925c47184baa28b03be24af975700460
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865600
Commit-Queue: Yves Arrouye <drcrash@chromium.org>
Commit-Queue: Sergey Poromov <poromov@chromium.org>
Auto-Submit: Yves Arrouye <drcrash@chromium.org>
Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706994}
parent 0ebd72f7
......@@ -164,7 +164,7 @@ std::string GetOSUsername() {
auto* user = user_manager::UserManager::Get()->GetPrimaryUser();
if (!user)
return std::string();
return user->GetAccountName(/*use_display_email=*/false);
return user->GetAccountId().GetUserEmail();
#else
NOTREACHED();
return std::string();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment