1
0
mirror of https://github.com/bitwarden/server synced 2026-01-03 09:03:44 +00:00

org invite validation and email tweaks

This commit is contained in:
Kyle Spearrin
2017-03-28 21:16:19 -04:00
parent da29160218
commit 472a4ade8f
6 changed files with 43 additions and 4 deletions

View File

@@ -34,6 +34,19 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task<OrganizationUser> GetByOrganizationAsync(Guid organizationId, string email)
{
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<OrganizationUser>(
"[dbo].[OrganizationUser_ReadByOrganizationIdEmail]",
new { OrganizationId = organizationId, Email = email },
commandType: CommandType.StoredProcedure);
return results.SingleOrDefault();
}
}
public async Task<Tuple<OrganizationUserUserDetails, ICollection<SubvaultUserDetails>>> GetDetailsByIdAsync(Guid id)
{
using(var connection = new SqlConnection(ConnectionString))