Click or drag to resize

IUserManager Interface


Represents the manager object that is in charge of managing Users and Groups.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax
public interface IUserManager : ITransactionalEntity, 
	IDisposable, IUserEvents, IUserGroupEvents

The IUserManager type exposes the following members.

Properties
  NameDescription
Public propertyContentStore
Gets the Content Store.
(Inherited from ITransactionalEntity.)
Public propertyCurrentUser
Gets the Operating User for the Session .
(Inherited from ITransactionalEntity.)
Public propertySendWorkFlowNotificationMail
Gets and sets whether to send notification emails during Workflow Advance.
Public propertySession
Gets the User Session that this manager instance was initiated from.
(Inherited from ITransactionalEntity.)
Top
Methods
  NameDescription
Public methodAddRole
Creates a new Group Role with specified Permissions.
Public methodAddUser
Creates a new User.
Public methodAddUserGroup
Creates a new User Group.
Public methodAdministrators
Retrieves the Administrators Group. The Administrators group always exists on any site instance. No matter how the Permissions are assigned to this group, it always has all administrative privileges.
Public methodDeepCloneT, TManager
Duplicates an object instance, not including its unique ID.
(Inherited from ITransactionalEntity.)
Public methodGetAdminDefaultDashboardPreferences
Public methodGetDashboardPreferencesForUser(String)
Public methodGetDashboardPreferencesForUser(IUser)
Public methodGetUserDefaultDashboardPreferences
Public methodGroupsCount
Gets the count of all Groups.
Public methodQuickWrite
Creates a temporary Write Session to quickly write something outside the current Session and transaction. This is a way to bypass the transaction and quickly put something into the content store.
(Inherited from ITransactionalEntity.)
Public methodRemoveRole
Removes a Group Role from the Content Store.
Public methodRemoveUser
Permanently removes a User.
Public methodRemoveUserGroup
Removes a User Group from the Content Store.
Public methodRole
Retrieves a Group Role by either its ID or its Name.
Public methodRoles
Retrieves, in a paginated fashion, the collection of Group Roles.
Public methodRolesCount
Gets the count of Group Roles.
Public methodUser
Retrieves a User by its User ID or Entity ID.
Public methodUserGroup
Retrieves a User Group by its unique ID.
Public methodUserGroups(String)
Retrieves the collection of Groups by their unique IDs.
Public methodUserGroups(Int32, Int32, Int32)
Retrieves, in a paginated fashion, the collection of Groups.
Public methodUsers(String)
Retrieves the collection of Users by either their User ID or Entity ID.
Public methodUsers(Int32, Int32, Int32)
Retrieves, in a paginated fashion, the collection of Users.
Public methodUsersCount
Gets the count of all Users.
Top
Events
  NameDescription
Public eventAfterUserDelete
This event is fired after a User is deleted.
(Inherited from IUserEvents.)
Public eventAfterUserGroupDelete
This event is fired after a Group is deleted.
(Inherited from IUserGroupEvents.)
Public eventBeforeUserDelete
This event is fired before a User is deleted.
(Inherited from IUserEvents.)
Public eventBeforeUserGroupDelete
This event is fired before a Group is deleted.
(Inherited from IUserGroupEvents.)
Public eventUserCreated
This event is fired when a User is created.
(Inherited from IUserEvents.)
Public eventUserGroupCreated
This event is fired when a Group is created.
(Inherited from IUserGroupEvents.)
Top
Remarks

Like all manager objects, instances of this manager are retrieved from an IUserSession object and only work within that session.

C#
using (IUserSession session = store.OpenReadSession(currentUser))
{
       IUserManager userManager = session.UserManager;
       ...
}
Examples
Serialization of this manager object is similar to users.xml before CMS 9.0:
XML
<?xml version="1.0"?>
<UserManager nextID="4" NTDomain="ingeniux" SMTPDomain="mydomain.com" Version="9.0">
  <Users>
    <User UserID="ingeniux\ashley" Name="Admin" Email="admin@mydomain.com" LastLogin="6/11/14 11:24 AM"/>
    <User UserID="ingeniux\someuser" Name="Some User" Email="someuser@mydomain.com" LastLogin="7/27/14 4:24 PM"/>
  </Users>
  <Groups>
    <Group Name="Editors" ID="UserGruops/3">
      <Users/>
      <UserRights>
        <UserRight Name="CanAddWordsToDictionary"/>
        <UserRight Name="CanViewSearch"/>
        <UserRight Name="CanViewHistory"/>
        <UserRight Name="CanViewEditForm"/>
        <UserRight Name="ViewHiddenElements"/>
        <UserRight Name="ViewXmlTab"/>
        <UserRight Name="Categorize"/>
        <UserRight Name="EditSS;"/>
        <UserRight Name="ReorderAssignedOthers"/>
        <UserRight Name="Create"/>
        <UserRight Name="CheckinCheckOut"/>
        <UserRight Name="Tree"/>
        <UserRight Name="Transition"/>
        <UserRight Name="Rollback"/>
        <UserRight Name="Mark"/>
        <UserRight Name="Delete"/>
        <UserRight Name="CheckIn"/>
        <UserRight Name="Edit"/>
        <UserRight Name="Assignment"/>
        <UserRight Name="Reorder"/>
      </UserRights>
    </Group>
    <Group Name="Authors" ID="UserGroups/2">
      <Users/>
      <UserRights>
        <UserRight Name="Categorize"/>
        <UserRight Name="Transition"/>
        <UserRight Name="Create"/>
        <UserRight Name="CheckinCheckOut"/>
        <UserRight Name="Edit"/>
        <UserRight Name="Assignment"/>
      </UserRights>
    </Group>
    <Group Name="Administrators" ID="UserGroup/1">
      <Users>
        <User UserID="ingeniux\ashley"/>
        <User UserID="ingeniux\awang"/>
      </Users>
      <UserRights>
        <UserRight Name="EditSS;"/>
        <UserRight Name="EditPasswords"/>
        <UserRight Name="ReorderAssignedOthers"/>
        <UserRight Name="Create"/>
        <UserRight Name="PageTypes"/>
        <UserRight Name="ForcePCR"/>
        <UserRight Name="CheckinCheckOut"/>
        <UserRight Name="Main"/>
        <UserRight Name="Tree"/>
        <UserRight Name="Transition"/>
        <UserRight Name="Workflow"/>
        <UserRight Name="Rollback"/>
        <UserRight Name="Publish"/>
        <UserRight Name="IncrementalPublish"/>
        <UserRight Name="Mark"/>
        <UserRight Name="Delete"/>
        <UserRight Name="CheckIn"/>
        <UserRight Name="Edit"/>
        <UserRight Name="Admin"/>
        <UserRight Name="Assignment"/>
        <UserRight Name="Reorder"/>
        <UserRight Name="Categorize"/>
        <UserRight Name="ManageTaxonomy"/>
        <UserRight Name="ViewXmlTab"/>
        <UserRight Name="ViewHiddenElements"/>
        <UserRight Name="ManageAssetSecurity"/>
        <UserRight Name="DeleteAssetFiles"/>
        <UserRight Name="ManageAssetFolders"/>
        <UserRight Name="LocalizeSiteDefinitions"/>
        <UserRight Name="SetPageLocale"/>
        <UserRight Name="CanViewEditForm"/>
        <UserRight Name="CanViewHistory"/>
        <UserRight Name="CanViewSearch"/>
        <UserRight Name="CanViewApps"/>
        <UserRight Name="CanAddWordsToDictionary"/>
        <UserRight Name="CanPublishDuplicated"/>
        <UserRight Name="CanManageSchema"/>
        <UserRight Name="CanEditAssets"/>
      </UserRights>
    </Group>
  </Groups>
</UserManager>
See Also