mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Admin: search for users include deleted
remove unnecessary function
This commit is contained in:
parent
90bdca04a6
commit
18b7fd73d0
@ -3,6 +3,7 @@ import { User } from '@entity/User'
|
||||
|
||||
@EntityRepository(User)
|
||||
export class UserRepository extends Repository<User> {
|
||||
|
||||
async findByPubkeyHex(pubkeyHex: string): Promise<User> {
|
||||
return this.createQueryBuilder('user')
|
||||
.where('hex(user.pubKey) = :pubkeyHex', { pubkeyHex })
|
||||
@ -14,10 +15,6 @@ export class UserRepository extends Repository<User> {
|
||||
return await this.findByPubkeyHex(pubKeyString)
|
||||
}
|
||||
|
||||
async findByEmail(email: string): Promise<User> {
|
||||
return this.createQueryBuilder('user').where('user.email = :email', { email }).getOneOrFail()
|
||||
}
|
||||
|
||||
async getUsersIndiced(userIds: number[]): Promise<User[]> {
|
||||
if (!userIds.length) return []
|
||||
const users = await this.createQueryBuilder('user')
|
||||
@ -33,6 +30,7 @@ export class UserRepository extends Repository<User> {
|
||||
|
||||
async findBySearchCriteria(searchCriteria: string): Promise<User[]> {
|
||||
return await this.createQueryBuilder('user')
|
||||
.withDeleted()
|
||||
.where(
|
||||
'user.firstName like :name or user.lastName like :lastName or user.email like :email',
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user