mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-11-03 19:14:03 +00:00 
			
		
		
		
	Start delete group method
This commit is contained in:
		@@ -121,6 +121,26 @@ export class AccountHelper {
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Check out whether the password of a user is valid
 | 
			
		||||
	 * or not
 | 
			
		||||
	 * 
 | 
			
		||||
	 * @param userID Target user ID
 | 
			
		||||
	 * @param password Target password
 | 
			
		||||
	 */
 | 
			
		||||
	public static async CheckUserPassword(userID: number, password: string) : Promise<boolean> {
 | 
			
		||||
		const crypt_pass = this.CryptPassword(password);
 | 
			
		||||
 | 
			
		||||
		return await DatabaseHelper.Count({
 | 
			
		||||
			table: USER_TABLE,
 | 
			
		||||
			where: {
 | 
			
		||||
				ID: userID,
 | 
			
		||||
				password: crypt_pass
 | 
			
		||||
			}
 | 
			
		||||
		}) > 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Crypt a password
 | 
			
		||||
	 * 
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user