PublicAPI.Portal.Security.User.GetUserDepartments ELMA API Documentation
Get all the user departments
 
 
Syntax

public IEnumerable<OrganizationItem> GetUserDepartments(
	User user
)

Parameters

user
Type: User
User. Object. Access path: PublicAPI.Portal.Security.User

Return Value

Type: IEnumerable OrganizationItem 
List of user departments
Examples

//load the user by ID 
var user = PublicAPI.Portal.Security.User.Load(3);

//get all the user departments. If there are not any, an empty list is returned 
var departmentList = PublicAPI.Portal.Security.User.GetUserDepartments(user);

//departmentList - list of all the user departments
See Also