Enables scripted content fragments to use Users
- Properties
- ChangePassword
- Create
- CreateFromLdap
- Delete
- Get
- HasActionLinks
- IsRegistered
- List
- ListActionLinks
- Lookup
- RequestExport
- Update
Properties
Name | Access | Type | Description |
---|---|---|---|
Accessing | Read | User | Accessing user |
AnonymousUserName | Read | String | The username of the anonymous system account. |
ApplicationTypeId | Read | Guid | Users application type identifier |
ContainerTypeId | Read | Guid | Users container type identifier |
ContentTypeId | Read | Guid | Users content type identifier |
Current | Read | User | Contextual user |
FormerMemberName | Read | String | The username of the Former Member system account. |
ServiceUserName | Read | String | The username of the service system account. |
ThemeTypeId | Read | Guid | Users theme type identifier |
TotalLicensed | Read | Int32 | Total number licensed users |
UserContentViewTypeId | Read | Guid | Id used to track a view to the a user |
Methods
ChangePassword
Changes a user password
Velocity
#set($additionalInfoResponse = $core_v2_user.ChangePassword($id, $oldPassword, $newPassword))
JavaScript
var additionalInfoResponse = core_v2_user.ChangePassword(id, oldPassword, newPassword);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required | ||
oldPassword | String | Old Password | Required | ||
newPassword | String | New Password | Required |
Returns
Create
Create Overload 1
Creates a new user
Velocity
#set($userResponse = $core_v2_user.Create($username, $password, $privateEmail))
JavaScript
var 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 |
Create Overload 2
Creates a new user. Profile fields can be passed as options in the format _ProfileFields_FIELDNAME = 'FIELDVALUE'
Velocity
#set($userResponse = $core_v2_user.Create($username, $password, $privateEmail, "%{ AcceptTermsOfService = $acceptTermsOfServiceArg, AllowSitePartnersToContact = $allowSitePartnersToContactArg, AllowSiteToContact = $allowSiteToContactArg, Bio = $bioArg, Birthday = $birthdayArg, DisplayName = $displayNameArg, EnableEmail = $enableEmailArg, EnableFavoriteSharing = $enableFavoriteSharingArg, EnableHtmlEmail = $enableHtmlEmailArg, ExtendedAttributes = $extendedAttributesArg, Gender = $genderArg, ImportFromLdap = $importFromLdapArg, JoinDate = $joinDateArg, Language = $languageArg, Location = $locationArg, PublicEmail = $publicEmailArg, RssFeeds = $rssFeedsArg, TimeZone = $timeZoneArg, TimeZoneId = $timeZoneIdArg, WebUrl = $webUrlArg }"))
JavaScript
var userResponse = core_v2_user.Create(username, password, privateEmail, { AcceptTermsOfService: acceptTermsOfServiceArg, AllowSitePartnersToContact: allowSitePartnersToContactArg, AllowSiteToContact: allowSiteToContactArg, Bio: bioArg, Birthday: birthdayArg, DisplayName: displayNameArg, EnableEmail: enableEmailArg, EnableFavoriteSharing: enableFavoriteSharingArg, EnableHtmlEmail: enableHtmlEmailArg, ExtendedAttributes: extendedAttributesArg, Gender: genderArg, ImportFromLdap: importFromLdapArg, JoinDate: joinDateArg, 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 | ||
AcceptTermsOfService | Boolean | Registers that a user has accepted the terms of service for this community when applicable. The default is false. | Optional | ||
AllowSitePartnersToContact | Boolean | Allow Site Partners To Contact | Optional | ||
AllowSiteToContact | Boolean | Allow Site To Contact | Optional | ||
Bio | String | Bio | Optional | ||
Birthday | DateTime | Birthday | Optional | ||
DisplayName | String | Display Name | Optional | ||
EnableEmail | Boolean | Allow user to receive emails. | Optional | ||
EnableFavoriteSharing | Boolean | Allow user's bookmarks to be viewed by others.. | Optional | ||
EnableHtmlEmail | Boolean | 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 | Boolean | Import From Ldap | Optional | ||
JoinDate | DateTime | Join Date | Optional | ||
Language | String | Language | Optional | ||
Location | String | Location | Optional | ||
PublicEmail | String | Public Email | Optional | ||
RssFeeds | IList of String | Rss Feeds | Optional | ||
TimeZone | Double | Time Zone | Optional | ||
TimeZoneId | String | Time Zone Id | Optional | ||
WebUrl | String | Web Url | Optional |
Returns
CreateFromLdap
CreateFromLdap Overload 1
Creates a new user from LDAP
Velocity
#set($userResponse = $core_v2_user.CreateFromLdap($username))
JavaScript
var userResponse = core_v2_user.CreateFromLdap(username);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
username | String | Username | Required |
CreateFromLdap Overload 2
Creates a new user from LDAP
Velocity
#set($userResponse = $core_v2_user.CreateFromLdap($username, $privateEmail))
JavaScript
var userResponse = core_v2_user.CreateFromLdap(username, privateEmail);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
username | String | Username | Required | ||
privateEmail | String | Private Email | Required |
Returns
Delete
Deletes a user
Velocity
#set($additionalInfoResponse = $core_v2_user.Delete("%{ DeleteAllContent = $deleteAllContentArg, Id = $idArg, ReassignedUserId = $reassignedUserIdArg, ReassignedUsername = $reassignedUsernameArg, Username = $usernameArg }"))
JavaScript
var additionalInfoResponse = core_v2_user.Delete({ DeleteAllContent: deleteAllContentArg, Id: idArg, ReassignedUserId: reassignedUserIdArg, ReassignedUsername: reassignedUsernameArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
DeleteAllContent | Boolean | 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 | Int32 | Either Id or Username is required. | Optional | ||
ReassignedUserId | Int32 | Reassign the deleted user's content to the user with this Id. If not specified, content will be reassigned to the former member account. | Optional | ||
ReassignedUsername | String | Reassign the deleted user's content to the user with this username. If not specified, content will be reassigned to the former member accountr. | Optional | ||
Username | String | Either Id or Username is required. | Optional |
Returns
Get
Gets a user
Velocity
#set($userResponse = $core_v2_user.Get("%{ ContentId = $contentIdArg, Email = $emailArg, Id = $idArg, Username = $usernameArg }"))
JavaScript
var userResponse = core_v2_user.Get({ ContentId: contentIdArg, Email: emailArg, Id: idArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ContentId | Guid | Either Id, ContentId, Email or Username is required. | Optional | ||
String | Either Id, ContentId, Email or Username is required. | Optional | |||
Id | Int32 | Either Id, ContentId, Email or Username is required. | Optional | ||
Username | String | Either Id, ContentId, Email or Username is required. | Optional |
Returns
HasActionLinks
Returns whether a user has action links
Velocity
#set($booleanResponse = $core_v2_user.HasActionLinks($id))
JavaScript
var booleanResponse = core_v2_user.HasActionLinks(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | User Id | Required |
Returns
Boolean
IsRegistered
Determines whether a user is registered
Velocity
#set($booleanResponse = $core_v2_user.IsRegistered($id))
JavaScript
var booleanResponse = core_v2_user.IsRegistered(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required |
Returns
Boolean
List
List Overload 1
Lists users
Velocity
#set($pagedListResponse = $core_v2_user.List())
JavaScript
var pagedListResponse = core_v2_user.List();
List Overload 2
Lists users
Velocity
#set($pagedListResponse = $core_v2_user.List("%{ ContentIds = $contentIdsArg, EmailAddress = $emailAddressArg, IncludeHidden = $includeHiddenArg, JoinDate = $joinDateArg, LastUpdatedUtcDate = $lastUpdatedUtcDateArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, Presence = $presenceArg, RoleId = $roleIdArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, Usernames = $usernamesArg }"))
JavaScript
var pagedListResponse = core_v2_user.List({ ContentIds: contentIdsArg, EmailAddress: emailAddressArg, IncludeHidden: includeHiddenArg, JoinDate: joinDateArg, LastUpdatedUtcDate: lastUpdatedUtcDateArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, Presence: presenceArg, 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 | Boolean | 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 | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 | |
Presence | String | Presence | Optional | Offline, Online | |
RoleId | Int32 | Role Id | Optional | ||
SortBy | String | Sort By | Optional | ContentIdsOrder, DisplayName, Email, JoinedDate, LastVisitedDate, 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 |
Returns
ListActionLinks
Returns action links for a user
Velocity
#set($iListResponse = $core_v2_user.ListActionLinks($id))
JavaScript
var iListResponse = core_v2_user.ListActionLinks(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | User Id | Required |
Returns
IList of UserActionLink
Lookup
Velocity
#set($apiListResponse = $core_v2_user.Lookup($queryText, "%{ PageSize = $pageSizeArg }"))
JavaScript
var apiListResponse = core_v2_user.Lookup(queryText, { PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
queryText | String | Query Text | Required | ||
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 |
Returns
RequestExport
RequestExport Overload 1
Initializes a request to export user data. The accessing user will receive a conversation message or email when the export is complete and ready for downloading.
Velocity
#set($additionalInfoResponse = $core_v2_user.RequestExport())
JavaScript
var additionalInfoResponse = core_v2_user.RequestExport();
RequestExport Overload 2
Initializes a request to export user data.The accessing user will receive a conversation message or email when the export is complete and ready for downloading.
Velocity
#set($additionalInfoResponse = $core_v2_user.RequestExport("%{ UserId = $userIdArg }"))
JavaScript
var additionalInfoResponse = core_v2_user.RequestExport({ UserId: userIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
UserId | Int32 | The user to export. | Optional |
Returns
Update
Updates a user. Profile fields can be passed as options in the format _ProfileFields_FIELDNAME = 'FIELDVALUE'
Velocity
#set($userResponse = $core_v2_user.Update("%{ AcceptTermsOfService = $acceptTermsOfServiceArg, AccountStatus = $accountStatusArg, AllowSitePartnersToContact = $allowSitePartnersToContactArg, AllowSiteToContact = $allowSiteToContactArg, BannedUntil = $bannedUntilArg, BanReason = $banReasonArg, Bio = $bioArg, Birthday = $birthdayArg, DisplayName = $displayNameArg, EnabledActivityMessageTypes = $enabledActivityMessageTypesArg, EnableEmail = $enableEmailArg, EnableFavoriteSharing = $enableFavoriteSharingArg, EnableHtmlEmail = $enableHtmlEmailArg, EnablePresenceTracking = $enablePresenceTrackingArg, EnableUserSignatures = $enableUserSignaturesArg, ExtendedAttributes = $extendedAttributesArg, ForceLogin = $forceLoginArg, Gender = $genderArg, Id = $idArg, IsIgnored = $isIgnoredArg, Language = $languageArg, Location = $locationArg, ModerationLevel = $moderationLevelArg, NewPassword = $newPasswordArg, OldPassword = $oldPasswordArg, PrivateEmail = $privateEmailArg, PublicEmail = $publicEmailArg, RssFeeds = $rssFeedsArg, TimeZone = $timeZoneArg, Username = $usernameArg, WebUrl = $webUrlArg }"))
JavaScript
var userResponse = core_v2_user.Update({ AcceptTermsOfService: acceptTermsOfServiceArg, AccountStatus: accountStatusArg, AllowSitePartnersToContact: allowSitePartnersToContactArg, AllowSiteToContact: allowSiteToContactArg, BannedUntil: bannedUntilArg, BanReason: banReasonArg, Bio: bioArg, Birthday: birthdayArg, DisplayName: displayNameArg, EnabledActivityMessageTypes: enabledActivityMessageTypesArg, EnableEmail: enableEmailArg, EnableFavoriteSharing: enableFavoriteSharingArg, EnableHtmlEmail: enableHtmlEmailArg, EnablePresenceTracking: enablePresenceTrackingArg, EnableUserSignatures: enableUserSignaturesArg, ExtendedAttributes: extendedAttributesArg, ForceLogin: forceLoginArg, Gender: genderArg, Id: idArg, IsIgnored: isIgnoredArg, 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 |
---|---|---|---|---|---|
AcceptTermsOfService | Boolean | Registers that a user has accepted the terms of service for this community when applicable. The default is false. | Optional | ||
AccountStatus | String | Account Status | Optional | All, ApprovalPending, Approved, Banned, Disapproved, PendingDeletion | |
AllowSitePartnersToContact | Boolean | Allow Site Partners To Contact | Optional | ||
AllowSiteToContact | Boolean | Allow Site To Contact | Optional | ||
BannedUntil | DateTime | Banned Until | Optional | ||
BanReason | String | Ban Reason | Optional | Advertising, Aggresive, BadSignature, BadUsername, BanDodging, Other, Profanity, Spam | |
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 | Boolean | Allow user to receive emails. | Optional | ||
EnableFavoriteSharing | Boolean | Allow user's bookmarks to be viewed by others. | Optional | ||
EnableHtmlEmail | Boolean | Allow user to receive emails in the HTML format. | Optional | ||
EnablePresenceTracking | Boolean | Allow presence tracking and reporting. | Optional | ||
EnableUserSignatures | Boolean | 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 | ||
ForceLogin | Boolean | Force Login | Optional | ||
Gender | String | Gender | Optional | Female, Male, NotSet | |
Id | Int32 | Either Id or Username is required. | Optional | ||
IsIgnored | Boolean | Is Ignored | 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 of String | Rss Feeds | Optional | ||
TimeZone | Double | Time Zone | Optional | ||
Username | String | Either Id or Username is required. | Optional | ||
WebUrl | String | Web Url | Optional |