Interface Users
interface Users {
all: Map<number, User>;
add(user: Partial<User>, options?: AddUserOptions): Promise<void>;
get(uid: number): undefined | User;
load(): Promise<void>;
login(
username: string,
password: string,
): Promise<{ cred: { gid: number; uid: number } }>;
password(oldPassword: string, newPassword: string): Promise<void>;
remove(uid: number): Promise<void>;
update(uid: number, updates: Partial<User>): Promise<void>;
}
all: Map<number, User>;
add(user: Partial<User>, options?: AddUserOptions): Promise<void>;
get(uid: number): undefined | User;
load(): Promise<void>;
login(
username: string,
password: string,
): Promise<{ cred: { gid: number; uid: number } }>;
password(oldPassword: string, newPassword: string): Promise<void>;
remove(uid: number): Promise<void>;
update(uid: number, updates: Partial<User>): Promise<void>;
}
Methods
add
- add(user: Partial<User>, options?: AddUserOptions): Promise<void>
Add a new user
Parameters
- user: Partial<User>
User to add
Optional
options: AddUserOptionsOptions for adding user
Returns Promise<void>
- user: Partial<User>
Interface for user management functionality