mirror of
https://github.com/bitwarden/server
synced 2026-01-07 19:13:50 +00:00
Changed all C# control flow block statements to include space between keyword and open paren
This commit is contained in:
@@ -46,7 +46,7 @@ namespace Bit.Core.Identity
|
||||
|
||||
public async Task<User> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
if(_currentContext?.User != null && _currentContext.User.Email == normalizedEmail)
|
||||
if (_currentContext?.User != null && _currentContext.User.Email == normalizedEmail)
|
||||
{
|
||||
return _currentContext.User;
|
||||
}
|
||||
@@ -57,14 +57,14 @@ namespace Bit.Core.Identity
|
||||
|
||||
public async Task<User> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
if(_currentContext?.User != null &&
|
||||
if (_currentContext?.User != null &&
|
||||
string.Equals(_currentContext.User.Id.ToString(), userId, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
return _currentContext.User;
|
||||
}
|
||||
|
||||
Guid userIdGuid;
|
||||
if(!Guid.TryParse(userId, out userIdGuid))
|
||||
if (!Guid.TryParse(userId, out userIdGuid))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user