Name: String;
The Name property determines a name of the security subject.
Sub Main;
Var
MB: IMetabase;
Sec: IMetabaseSecurity;
Group: IMetabaseGroup;
User: IMetabaseUser;
Data: ISecurityPackageUserData;
PS: IPasswordCredentials;
Begin
MB := MetabaseClass.Active;
Sec := MB.Security;
Group := Sec.Groups.Item(0);
User := Sec.AddUser("User_1");
User.FullName := "The first user";
User.Description := "New user of the platform";
Data := User.PackageData;
PS := Data.Credentials As IPasswordCredentials;
PS.Password := "Password";
User.MustChangePasswordAtNextLogon := True;
Group.AddMember(User);
Sec.Apply;
End Sub Main;
A new user is created after executing this example. This user is added into the first group created in a security manager. On the first login to the platform under this user, the request for password changing will be displayed.
See also: