Add ID validation in setID

pull/77/head
MillenniumEarl 2021-03-10 15:01:45 +01:00
parent fd830d41fa
commit 0924cedbb1
1 changed files with 3 additions and 0 deletions

View File

@ -143,6 +143,9 @@ export default class PlatformUser implements ILazy {
//#region Public methods
public setID(id: number): void {
// Check ID
if (!id || id < 1) throw new InvalidID(INVALID_USER_ID);
this._id = id;
}