User
Access path: PublicAPI.Portal.Security.UserMethods
Name | Description | |
---|---|---|
Block |
Lock the user account
| |
Count |
Returns the total number of objects of this type
| |
Count(IEntityFilter) |
Get Total Number of Objects by Filter
| |
Create |
Create New Entity (without a Database entry)
| |
Delete |
Delete Object
| |
Filter |
Creates an assistant for working with the "User" object filter
| |
Find(FetchOptions) |
Find objects according to fetch options
| |
Find(String) |
Find objects according to the filter in the EQL language
| |
Find(IEntityFilter, FetchOptions) |
Fing objects according to fetch options and filter
| |
FindByIdArray |
Find All Objects by Array IDs
| |
GetCurrentUser |
Get the current authenticated user
| |
GetPositions | Obsolete.
Get all the user positions
| |
GetSubUsersByLvl |
Get the user subordinates by nest level
| |
GetUserDepartments |
Get all the user departments
| |
GetUserPositions |
Get all the user positions
| |
HasChiefForUser |
Checks, if the user has a chief
| |
IsActive |
Check, if the user account is active
| |
IsDirty |
Check, if there are unsaved changes in the object
| |
IsNew |
Check, if the object is new (not saved in the database)
| |
IsSubordinateUser |
Check, if the user is a chief of another user
| |
Load(Guid) |
Load by UID. If not found, an exception is invoked
| |
Load(Int64) |
Load user by ID. If not found, an exception is invoked.
| |
LoadByLogin |
Load user by login
| |
LoadOrCreate(Guid) |
Load by ID. If not found, the new object is returned
| |
LoadOrCreate(Int64) |
Load by ID. If not found, the new object is returned
| |
LoadOrNull(Guid) |
Load by UID. If not found, null is returned
| |
LoadOrNull(Int64) |
Load user by ID
| |
Refresh |
Refresh (read over) Object from Database
| |
Save(User) |
Save user to database
| |
Save(User, Boolean) |
Save user to database
| |
UnBlock |
Unlock the user account
|
Properties
Name | Description | |
---|---|---|
TypeUid |
Returns the unique object identifier "User"
|
Remarks
Examples
Create a new user
var myUser = PublicAPI.Security.User.Create();
Before any operations with the variable myUser, fill in its required fields
//account myUser.UserName = "Petrov"; //last name myUser.LastName = "Smith"; //first name myUser.FirstName = "John"; //hired on (date) myUser.EmployDate = DateTime.Now;
Please save the object in the base to ensure its proper functioning
myUser.Save();
See Also