Commit ccfa68e7 authored by Alexander Alekseev's avatar Alexander Alekseev Committed by Commit Bot

Chrome OS: Fix crash in SigninScreenHandler::HandleAuthenticateUser.

SigninScreenHandler::HandleAuthenticateUser should ignore 'User not found'
errors.

Bug: 794487
Change-Id: I83c9a9bc2787514384e5bbee9253eaf383df94db
Reviewed-on: https://chromium-review.googlesource.com/850998Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527106}
parent 63b4eb1a
...@@ -1186,7 +1186,12 @@ void SigninScreenHandler::HandleAuthenticateUser(const AccountId& account_id, ...@@ -1186,7 +1186,12 @@ void SigninScreenHandler::HandleAuthenticateUser(const AccountId& account_id,
const user_manager::User* user = const user_manager::User* user =
user_manager::UserManager::Get()->FindUser(account_id); user_manager::UserManager::Get()->FindUser(account_id);
DCHECK(user); DCHECK(user);
user_context.SetUserType(user->GetType()); if (!user) {
LOG(ERROR) << "HandleAuthenticateUser: User not found! account type="
<< AccountId::AccountTypeToString(account_id.GetAccountType());
} else {
user_context.SetUserType(user->GetType());
}
if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY) if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY)
user_context.SetUserType(user_manager::USER_TYPE_ACTIVE_DIRECTORY); user_context.SetUserType(user_manager::USER_TYPE_ACTIVE_DIRECTORY);
delegate_->Login(user_context, SigninSpecifics()); delegate_->Login(user_context, SigninSpecifics());
......
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