users.confirmCredentials

Syntax

mixed users.confirmCredentials ( int vhost, string username, string password, bool returnUserInfo = false, bool login = false, bool isEmail = false, bool isPhone = false, mixed detailedError = false, mixed mfatoken = '' )

Argument Info

NameTypeRequiredDefault valueDescription
vhostintRequirednoneThe id of the vhost.
usernamestringRequirednoneThe username of the user you are attempting to confirm.
passwordstringRequirednoneThe password for the user you are attempting to confirm.
returnUserInfoboolOptionalfalseIf this parameter is true it will return user info in an array as listed below
loginboolOptionalfalseIf this parameter is true it will create a user session token for the user. For this to be available you need to call the method with the returnUserInfo argument set to true.
isEmailboolOptionalfalseIf this parameter is true it will treat the username parameter as an e-mail address instead of a username string.
isPhoneboolOptionalfalseIf this parameter is true it will compare the username parameter against the phone number field instead of the username field.
detailedErrormixedOptionalfalse
mfatokenmixedOptional''

Response: Optionally returned array

This is the data array that could potentially be returned if returnUserInfo is set to true

NameTypeDescription
idINTThe user id for the username/email provided.
userSTRINGThe username for the account requested.
vhostINTThe vhost for the account requested.
firstnameSTRINGThe first name for the account requested.
lastnameSTRINGThe last name for the account requested.
nicknameSTRINGThe nickname for the account requested.
address1STRINGThe first line of the address for the account requested.
address2STRINGThe second line of the address for the account requested.
citySTRINGThe city for the account requested.
stateSTRINGThe state/province for the account requested.
countrySTRINGThe country for the requested account.
postalSTRINGThe postal code or zip code for the requested account.
emailSTRINGThe e-mail address for the requested account.
websiteSTRINGThe website for the requested account.
genderCHARThe gender of the requested account owner, obviously this is only going to be M for male or F for female.
phoneSTRINGThe phone number for the requested account owner.
cellphoneSTRINGThe cell phone number for the requested account owner.
occupationSTRINGThe occupation for the requested account owner.
metaSERIALIZED ARRAYAn array containing any meta data that was provided by the account owner that has been saved by the system.
newsletterBOOLWhether or not the account owner wanted the newsletter or not. 1 is true, 0 is false.

Return Values

FieldDescriptionPossible Values