Enables scripted content fragments to use Users
- Properties
- ChangePassword
- ChangePasswordUsingToken
- Create
- CreateFromLdap
- Delete
- Get
- HasActionLinks
- IsNewAccount
- IsRegistered
- IsUserUnverified
- List
- ListActionLinks
- ListUnverifiedEmails
- Lookup
- RequestExport
- SendVerificationEmail
- Update
- VerifyWithKey
- VerifyWithoutKey
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 user. DEPRECATED in v12.1: Use the default view type '00000000-0000-0000-0000-000000000000' instead. |
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
ChangePasswordUsingToken
Changes a user password using a temporary verification token
Velocity
#set($additionalInfoResponse = $core_v2_user.ChangePasswordUsingToken($token, $newPassword))
JavaScript
var additionalInfoResponse = core_v2_user.ChangePasswordUsingToken(token, newPassword);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
token | String | Token | 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 | ||
options | Options | Set of optional parameters including: | 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, MergeToReassignedUser = $mergeToReassignedUserArg, ReassignedUserId = $reassignedUserIdArg, ReassignedUsername = $reassignedUsernameArg, Username = $usernameArg }"))
JavaScript
var additionalInfoResponse = core_v2_user.Delete({ DeleteAllContent: deleteAllContentArg, Id: idArg, MergeToReassignedUser: mergeToReassignedUserArg, ReassignedUserId: reassignedUserIdArg, ReassignedUsername: reassignedUsernameArg, Username: usernameArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
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 | ||
MergeToReassignedUser | Boolean | This options should only be used if the user being deleted was created mistakenly as a duplicate account of the existing user. If true, in addition to content being reassigned to the reassign user, all group memberships, profile data, security roles, conversations, subscriptions, notification settings and friendships will be merged. Cannot be merged with a system account. | 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' account. | 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 |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
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
IsNewAccount
Used to determine if an account is newly created. Returns false if no account exists that matches the key.
Velocity
#set($booleanResponse = $core_v2_user.IsNewAccount($key))
JavaScript
var booleanResponse = core_v2_user.IsNewAccount(key);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
key | String | Key | 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
IsUserUnverified
Indicates the user has never verified any email address.
Velocity
#set($booleanResponse = $core_v2_user.IsUserUnverified($userId))
JavaScript
var booleanResponse = core_v2_user.IsUserUnverified(userId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | User 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 |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
ContentIds | String | Comma separated list of ContentIds. Used to limit to a specific set of users as well as sort order if SortBy 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
ListUnverifiedEmails
ListUnverifiedEmails Overload 1
Displays any email addresses for the specified user that have not been verified.
Velocity
#set($apiListResponse = $core_v2_user.ListUnverifiedEmails($verificationContext))
JavaScript
var apiListResponse = core_v2_user.ListUnverifiedEmails(verificationContext);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
verificationContext | Guid | Verification Context | Required |
ListUnverifiedEmails Overload 2
Displays any email addresses for the specified user that have not been verified.
Velocity
#set($apiListResponse = $core_v2_user.ListUnverifiedEmails($userId))
JavaScript
var apiListResponse = core_v2_user.ListUnverifiedEmails(userId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | User Id | Required |
Returns
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 | ||
options | Options | Set of optional parameters including: | 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 |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
UserId | Int32 | The user to export. | Optional |
Returns
SendVerificationEmail
SendVerificationEmail Overload 1
Resends a verification email to the specified email address.
Velocity
#set($additionalInfoResponse = $core_v2_user.SendVerificationEmail($verificationContext))
JavaScript
var additionalInfoResponse = core_v2_user.SendVerificationEmail(verificationContext);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
verificationContext | Guid | Verification Context | Required |
SendVerificationEmail Overload 2
Resends a verification email to the specified email address.
Velocity
#set($additionalInfoResponse = $core_v2_user.SendVerificationEmail($userId))
JavaScript
var additionalInfoResponse = core_v2_user.SendVerificationEmail(userId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | User Id | Required |
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, EnableDisplayInMemberList = $enableDisplayInMemberListArg, EnableDisplayName = $enableDisplayNameArg, EnableEmail = $enableEmailArg, EnableFavoriteSharing = $enableFavoriteSharingArg, EnableHtmlEmail = $enableHtmlEmailArg, EnablePresenceTracking = $enablePresenceTrackingArg, EnableUserSignatures = $enableUserSignaturesArg, ExtendedAttributes = $extendedAttributesArg, ForceLogin = $forceLoginArg, Gender = $genderArg, Id = $idArg, IsBirthdaySet = $isBirthdaySetArg, IsIgnored = $isIgnoredArg, Language = $languageArg, Location = $locationArg, ModerationLevel = $moderationLevelArg, NewPassword = $newPasswordArg, OldPassword = $oldPasswordArg, PrivateEmail = $privateEmailArg, PublicEmail = $publicEmailArg, RssFeeds = $rssFeedsArg, TimeZone = $timeZoneArg, TimeZoneId = $timeZoneIdArg, 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, EnableDisplayInMemberList: enableDisplayInMemberListArg, EnableDisplayName: enableDisplayNameArg, EnableEmail: enableEmailArg, EnableFavoriteSharing: enableFavoriteSharingArg, EnableHtmlEmail: enableHtmlEmailArg, EnablePresenceTracking: enablePresenceTrackingArg, EnableUserSignatures: enableUserSignaturesArg, ExtendedAttributes: extendedAttributesArg, ForceLogin: forceLoginArg, Gender: genderArg, Id: idArg, IsBirthdaySet: isBirthdaySetArg, IsIgnored: isIgnoredArg, Language: languageArg, Location: locationArg, ModerationLevel: moderationLevelArg, NewPassword: newPasswordArg, OldPassword: oldPasswordArg, PrivateEmail: privateEmailArg, PublicEmail: publicEmailArg, RssFeeds: rssFeedsArg, TimeZone: timeZoneArg, TimeZoneId: timeZoneIdArg, Username: usernameArg, WebUrl: webUrlArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
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 | ||
EnableDisplayInMemberList | Boolean | Enable Display In Member List | Optional | ||
EnableDisplayName | Boolean | Enable 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 | ||
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 | ||
IsBirthdaySet | Boolean | Is Birthday Set | 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 | ||
TimeZoneId | String | Time Zone Id | Optional | ||
Username | String | Either Id or Username is required. | Optional | ||
WebUrl | String | Web Url | Optional |
Returns
VerifyWithKey
Attempts to validate a given key against any possible unverified email records.
Velocity
#set($stringResponse = $core_v2_user.VerifyWithKey($key))
JavaScript
var stringResponse = core_v2_user.VerifyWithKey(key);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
key | String | Key | Required |
Returns
String
VerifyWithoutKey
Attempt to verify a user's email without a key. This is intended as an administrative bypass, and requires permission to manage membership accounts.
Velocity
#set($stringResponse = $core_v2_user.VerifyWithoutKey($userId, $emailAddress))
JavaScript
var stringResponse = core_v2_user.VerifyWithoutKey(userId, emailAddress);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | User Id | Required | ||
emailAddress | String | Email Address | Required |
Returns
String