Enables scripted content fragments to use Users
Properties
Name | Type | Description | Default | Options |
---|---|---|---|---|
Accessing | User | Accessing user | ||
ApplicationTypeId | Guid | Users application type identifier | ||
ContainerTypeId | Guid | Users container type identifier | ||
ContentTypeId | Guid | Users content type identifier | ||
Current | User | Contextual user | ||
ThemeTypeId | Guid | Users theme type identifier | ||
TotalLicensed | int | Total number licensed users | ||
UserContentViewTypeId | Guid | Id used to track a view to the a user |
Methods
ChangePassword
Changes a user password
Usage
#set($additionalInfoResponse = $core_v2_user.ChangePassword($id, $oldPassword, $newPassword))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Id | Required | ||
oldPassword | string | Old Password | Required | ||
newPassword | string | New Password | Required |
Return Type
Create
Creates a new user
Usage
#set($userResponse = $core_v2_user.Create($username, $password, $privateEmail))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
username | string | Username | Required | ||
password | string | Password | Required | ||
privateEmail | string | Private Email | Required |
Return Type
Create
Creates a new user. Profile fields can be passed as options in the format _ProfileFields_FIELDNAME = 'FIELDVALUE'
Usage
#set($userResponse = $core_v2_user.Create($username, $password, $privateEmail, "%{AllowSitePartnersToContact = $allowSitePartnersToContactArg, AllowSiteToContact = $allowSiteToContactArg, Bio = $bioArg, Birthday = $birthdayArg, DisplayName = $displayNameArg, EnableEmail = $enableEmailArg, EnableFavoriteSharing = $enableFavoriteSharingArg, EnableHtmlEmail = $enableHtmlEmailArg, ExtendedAttributes = $extendedAttributesArg, Gender = $genderArg, ImportFromLdap = $importFromLdapArg, Language = $languageArg, Location = $locationArg, PublicEmail = $publicEmailArg, RssFeeds = $rssFeedsArg, TimeZone = $timeZoneArg, TimeZoneId = $timeZoneIdArg, WebUrl = $webUrlArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
username | string | Username | Required | ||
password | string | Password | Required | ||
privateEmail | string | Private Email | Required | ||
AllowSitePartnersToContact | bool | Allow Site Partners To Contact | Optional | ||
AllowSiteToContact | bool | Allow Site To Contact | Optional | ||
Bio | string | Bio | Optional | ||
Birthday | DateTime | Birthday | Optional | ||
DisplayName | string | Display Name | Optional | ||
EnableEmail | bool | Allow user to receive emails. | Optional | ||
EnableFavoriteSharing | bool | Allow user's bookmarks to be viewed by others.. | Optional | ||
EnableHtmlEmail | bool | Allow user to receive emails in the HTML format. | Optional | ||
ExtendedAttributes | string | Extended attributes are key-value pairs set using the syntax _ExtendedAttributes_key=value. i.e. _ExtendedAttributes_MyKey=MyValue sets ExtendedAttributes["MyKey"] to "MyValue". | Optional | ||
Gender | string | Gender | Optional | Female, Male, NotSet | |
ImportFromLdap | bool | Import From Ldap | Optional | ||
Language | string | Language | Optional | ||
Location | string | Location | Optional | ||
PublicEmail | string | Public Email | Optional | ||
RssFeeds | IList<string> | Rss Feeds | Optional | ||
TimeZone | double | Time Zone | Optional | ||
TimeZoneId | string | Time Zone Id | Optional | ||
WebUrl | string | Web Url | Optional |
Return Type
CreateFromLdap
Creates a new user from LDAP
Usage
#set($userResponse = $core_v2_user.CreateFromLdap($username))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
username | string | Username | Required |
Return Type
CreateFromLdap
Creates a new user from LDAP
Usage
#set($userResponse = $core_v2_user.CreateFromLdap($username, $privateEmail))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
username | string | Username | Required | ||
privateEmail | string | Private Email | Required |
Return Type
Delete
Deletes a user
Usage
#set($additionalInfoResponse = $core_v2_user.Delete("%{DeleteAllContent = $deleteAllContentArg, Id = $idArg, ReassignedUserId = $reassignedUserIdArg, ReassignedUsername = $reassignedUsernameArg, Username = $usernameArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
DeleteAllContent | bool | If DeleteAllContent is set to true, ReassignUserId and ReassignUsername are ignored. User's content and related content will be deleted. (For example, if user has authored a blog post, that post and all related comments, likes, bookmarks, etc will be removed.) | Optional | False | |
Id | int | Either Id or Username is required. | Optional | ||
ReassignedUserId | int | Reassign the deleted user's content to the user with this Id. If not specified, content will be reassigned to the anonymous user. | Optional | ||
ReassignedUsername | string | Reassign the deleted user's content to the user with this username. If not specified, content will be reassigned to the anonymous user. | Optional | ||
Username | string | Either Id or Username is required. | Optional |
Return Type
Get
Gets a user
Usage
#set($userResponse = $core_v2_user.Get("%{Email = $emailArg, Id = $idArg, Username = $usernameArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
string | Either Id, Email, or Username is required. | Optional | |||
Id | int | Either Id, Email, or Username is required. | Optional | ||
Username | string | Either Id, Email, or Username is required. | Optional |
Return Type
HasActionLinks
Returns whether a user has action links
Usage
#set($booleanResponse = $core_v2_user.HasActionLinks($id))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | User Id | Required |
Return Type
bool
IsRegistered
Determines whether a user is registered
Usage
#set($booleanResponse = $core_v2_user.IsRegistered($id))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Id | Required |
Return Type
bool
List
Lists users
Usage
#set($pagedListResponse = $core_v2_user.List("%{ContentIds = $contentIdsArg, EmailAddress = $emailAddressArg, IncludeHidden = $includeHiddenArg, JoinDate = $joinDateArg, LastUpdatedUtcDate = $lastUpdatedUtcDateArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, RoleId = $roleIdArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, Usernames = $usernamesArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ContentIds | string | Comma separated list of ContentIds. Used to limit to a specific set of users as well as sort order if SoryBy is set to ContentIdsOrder. | Optional | ||
EmailAddress | string | Used to limit to a specific user based on email address. | Optional | ||
IncludeHidden | bool | By default 'hidden' users (like service accounts) will not be returned. Set IncludeHidden=true to return all users. | Optional | ||
JoinDate | DateTime | Used to limit to just users who have joined since the specified date. | Optional | ||
LastUpdatedUtcDate | DateTime | Last Updated Utc Date | Optional | ||
PageIndex | int | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | int | Specify the number of results to return per page. | Optional | 20 | |
RoleId | int | Role Id | Optional | ||
SortBy | string | Sort By | Optional | ContentIdsOrder, DisplayName, Email, JoinedDate, LastActiveDate, Posts, RecentPosts, Score:SCORE_ID, Username, Website | |
SortOrder | string | Sort Order | Optional | Ascending, Descending | |
Usernames | string | Used to limit to a specific set of users. | Optional |
Return Type
List
Lists users
Usage
#set($pagedListResponse = $core_v2_user.List())
Return Type
ListActionLinks
Returns action links for a user
Usage
#set($iListResponse = $core_v2_user.ListActionLinks($id))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | User Id | Required |
Return Type
IList<UserActionLink>
Update
Updates a user. Profile fields can be passed as options in the format _ProfileFields_FIELDNAME = 'FIELDVALUE'
Usage
#set($userResponse = $core_v2_user.Update("%{AccountStatus = $accountStatusArg, AllowSitePartnersToContact = $allowSitePartnersToContactArg, AllowSiteToContact = $allowSiteToContactArg, Bio = $bioArg, Birthday = $birthdayArg, DisplayName = $displayNameArg, EnabledActivityMessageTypes = $enabledActivityMessageTypesArg, EnableEmail = $enableEmailArg, EnableFavoriteSharing = $enableFavoriteSharingArg, EnableHtmlEmail = $enableHtmlEmailArg, EnableUserSignatures = $enableUserSignaturesArg, ExtendedAttributes = $extendedAttributesArg, Gender = $genderArg, Id = $idArg, Language = $languageArg, Location = $locationArg, ModerationLevel = $moderationLevelArg, NewPassword = $newPasswordArg, OldPassword = $oldPasswordArg, PrivateEmail = $privateEmailArg, PublicEmail = $publicEmailArg, RssFeeds = $rssFeedsArg, TimeZone = $timeZoneArg, Username = $usernameArg, WebUrl = $webUrlArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
AccountStatus | string | Account Status | Optional | ||
AllowSitePartnersToContact | bool | Allow Site Partners To Contact | Optional | ||
AllowSiteToContact | bool | Allow Site To Contact | Optional | ||
Bio | string | Bio | Optional | ||
Birthday | DateTime | Birthday | Optional | ||
DisplayName | string | Display Name | Optional | ||
EnabledActivityMessageTypes | string | Now that Activity Stories have superseded activity messages, use ActivityStoryUserPreferences to get more accurate information. | Optional | ||
EnableEmail | bool | Allow user to receive emails. | Optional | ||
EnableFavoriteSharing | bool | Allow user's bookmarks to be viewed by others.. | Optional | ||
EnableHtmlEmail | bool | Allow user to receive emails in the HTML format. | Optional | ||
EnableUserSignatures | bool | Enable User Signatures | Optional | ||
ExtendedAttributes | string | Extended attributes are key-value pairs set using the syntax _ExtendedAttributes_key=value. i.e. _ExtendedAttributes_MyKey=MyValue sets ExtendedAttributes["MyKey"] to "MyValue". | Optional | ||
Gender | string | Gender | Optional | Female, Male, NotSet | |
Id | int | Either Id or Username is required. | Optional | ||
Language | string | Language | Optional | ||
Location | string | Location | Optional | ||
ModerationLevel | string | Moderation Level | Optional | Moderated, Unmoderated | |
NewPassword | string | New Password | Optional | ||
OldPassword | string | Required if changing the password. | Optional | ||
PrivateEmail | string | Private Email | Optional | ||
PublicEmail | string | Public Email | Optional | ||
RssFeeds | IList<string> | Rss Feeds | Optional | ||
TimeZone | double | Time Zone | Optional | ||
Username | string | Either Id or Username is required. | Optional | ||
WebUrl | string | Web Url | Optional |