Print this Page

USER Functions

Below is a listing of all the functions.

 

AddUser

Add User

This method adds a user to the database.

 

Return Type:  ftUser

 

Name

Type

Description

userObj

ftUser

The user you wish to add.

Verification

String

This is the password for the user (second verification).

SendMail

Boolean

Whether the user should be emailed their login information or not.

AuthorIcon

String

The users author icon.

 

Examples

Visual Basic.Net

'Method Add User

Dim User As ftUser

User.Username = "FuseTalkUser"

User.FirstName = "Jane"

User.LastName = "Doe"

User.EmailAddress = "jdoe@fusetalk.com"

User.Password = "mypassword"

User.City = "Ottawa"

User.StateID = 5

User.CountryID = 20

User.Status = 1

User.UserLevel = 1

User.TimeZoneID = 25

User.TimeZoneDiff = -5.0

User.WebURL = "http://www.fusetalk.com"

User.Signature = "This is my signature"

User.Type = "g"

User = ftObj.AddUser(User, "mypassword", False, "default.gif", ForumID)

If User.ErrorCode = 0 Then

    MsgBox(User.ID)

Else

    MsgBox("Error: " & User.ErrorCode)

End If

 

C#

//Method Add User

FuseTalk.API.ftUser User;

User = new FuseTalk.API.ftUser();

 

User.Username = "FuseTalkUser";

User.FirstName = "Jane";

User.LastName = "Doe";

User.EmailAddress = "jdoe@fusetalk.com";

User.Password = "mypassword";

User.City = "Ottawa";

User.StateID = "5";

User.CountryID = 20;

User.Status = 1;

User.UserLevel = 1;

User.TimeZoneID = 25;

User.TimeZoneDiff = "-5.0";

User.WebURL = "http://www.fusetalk.com";

User.Signature = "This is my signature";

User.Type = "g";

 

User = ftObj.AddUser(User, "mypassword", false, "default.gif", ForumID.Tostring());

if (User.ErrorCode == 0)

{

Interaction.MsgBox(User.ID, 0, null);

}

else

{

Interaction.MsgBox("Error: " + User.ErrorCode, 0, null);

}

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName, GetUserByID, GetUserSettings, LoginGlobal, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

AddUser

Add User

This method adds a user to the database.

 

Return Type:  ftUser

 

Name

Type

Description

UserObj

ftUser

The user you wish to add.

Verification

String

This is the password for the user (second verification).

SendMail

Boolean

Whether the user should be emailed their login information or not.

AuthorIcon

String

The users author icon.

ForumID

String

The forum ID you wish to insert the user in.

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName, GetUserByID, GetUserSettings, LoginGlobal, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

ApproveUser

ApproveUser

This method approves users if workflow is enabled in a forum.

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

The user ID of the user you want to approve.

ForumID

Integer

The forum ID the user belongs to.

 

CustomizeUser

CustomizeUser

This method customizes settings for a specified user (profile settings).

 

Return Type: Integer

 

Name

Type

Description

u

ftUser

The user you wish to customize.

 

Examples

Visual Basic.Net

'Method CustomizeUser

User.MessagesPerPage = 20

ftObj.CustomizeUser(User)

 

C#

//Method CustomizeUser

User.MessagesPerPage = 20;

ftObj.CustomizeUser(User);

 

DeleteForumUser

DeleteForumUser

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

 

ForumID

Integer

 

 

Examples

Visual Basic.Net

'Method DeleteForumUser

ftObj.DeleteForumUser(User.ID, 2)

 

C#

//Method DeleteForumUser

ftObj.DeleteForumUser(User.ID, 2);

 

DeleteUser

DeleteUser

This method deletes a user from the database. NOTE: this function will delete the user immediately from the database.

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

The ID for the user.

ForumID

Integer

The forum ID the user belongs to.

 

Examples

Visual Basic.Net

'Method DeleteUser

ftObj.DeleteUser(MyUser.ID, ForumID)

 

C#

//Method DeleteUser

ftObj.DeleteUser(User.ID, ForumID);

 

GetForumsForUser

GetForumsForUser

This method retrieves the forums that a user has access to.

 

Return Type:  Forum()

 

Name

Type

Description

UserID

Integer

The ID of the user you want to retrieve forums for.

 

Examples

Visual Basic.Net

'Method GetForumsForUser

Dim Forums() As Forum = ftObj.GetForumsForUser(User.ID)

If Not Forums Is Nothing Then

    Dim f As Forum

    For Each f In Forums

        MsgBox(f.Name)

    Next

End If

 

C#

//Method GetForumsForUser

FuseTalk.API.Forum[] Forums = ftObj.GetForumsForUser(User.ID);

if (Forums !=  null)

{

foreach (FuseTalk.API.Forum f in Forums)

{

Interaction.MsgBox(f.Name, 0, null);

}

}

 

Related Items

GetForumByCategoryID, GetForumByName, GetForumByID, GetAllForums, SearchForumsByCriteria, SearchForumsByAlphabet, GetForumGroupings, GetAllForumGroupings

 

GetIPSForUser

GetIPSForUser

This method gets a listing of all the IPS's a user has posted with.

 

Return Type: String

 

Name

Type

Description

UserID

Integer

The ID for the user you want to retrieve IPS's for.

 

Examples

Visual Basic.Net

'Method GetIPSForUser

Dim IPAddresses As String = ftObj.GetIPSForUser(User.ID)

MsgBox(IPAddresses)

 

C#

//Method GetIPSForUser

string IPAddresses = ftObj.GetIPSForUser(User.ID);

Interaction.MsgBox(IPAddresses, 0, null);

 

GetNonApprovedUsers

GetNonApprovedUsers

This method approves gets users that are not approved for a forum by forumid.

 

Return Type:  ftUser()

 

Name

Type

Description

ForumID

Integer

The forum ID the user belongs to.

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName, GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

GetTodayBirthDate

GetTodayBirthDate

Get all the users who have birthdays today.

 

Return Type:  ftUser()

 

Name

Type

Description

ForumID

Integer

The forum ID which the users belong to.

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, GetUserByName, GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

GetUserByEmail

GetUserByEmail

Get a user based on an e-mail address.

 

Return Type:  ftUser

 

Name

Type

Description

EmailAddress

String

The e-mail address of the user you want to retrieve.

ForumID

Integer

The forum ID the user belongs to.

 

Examples

Visual Basic.Net

'Method GetUserByEmail

User = ftObj.GetUserByEmail("jdoe@fusetalk.com", ForumID)

MsgBox(User.EmailAddress)

 

C#

//Method GetUserByEmail

User = ftObj.GetUserByEmail("jdoe@fusetalk.com", ForumID);

Interaction.MsgBox(User.EmailAddress, 0, null);

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName, GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

GetUserByID

GetUserByID

This method gets a user record by ID.

 

Return Type:  ftUser

 

Name

Type

Description

UserID

Integer

The ID for the user you want to retrieve information for.

 

Examples

Visual Basic.Net

'Method GetUserByID

Dim GetByID As ftUser = ftObj.GetUserByID(User.ID)

MsgBox(User.MessagesPerPage)

 

C#

//Method GetUserByID

FuseTalk.API.ftUser GetByID = ftObj.GetUserByID(User.ID);

Interaction.MsgBox(GetByID.MessagesPerPage, 0, null);

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName,  GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

GetUserByKeyword

GetUserByKeyword

This method retrieves users by keyword.

 

Return Type:  ftUser()

 

Name

Type

Description

Keyword

String

The keyword to search by (user's username).

ForumID

Integer

The forum ID the user belongs to.

Type

String

Whether the search is by keyword or alphabet.

 

Examples

Visual Basic.Net

'Method GetUserByKeyword

Dim Users() As ftUser = ftObj.GetUserByKeyword("fusetalk", ForumID, 1)

If Not Users Is Nothing Then

    Dim u As ftUser

    For Each u In Users

        MsgBox(u.Username)

    Next

End If

 

C#

//Method GetUserByKeyword

FuseTalk.API.ftUser[] Users = ftObj.GetUserByKeyword("fusetalk", ForumID, 1);

if (Users !=  null)

{

foreach (FuseTalk.API.ftUser u in Users)

{

Interaction.MsgBox(u.Username, 0, null);

}

}

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName, GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

GetUserByName

GetUserByName

This method gets a user record by username for a specified forum.

 

Return Type:  ftUser

 

Name

Type

Description

UserName

String

The username of the user which you want to retrieve data for.

ForumID

String

The ID of the forum that the user belongs to. Enter a 0 if you wish to pull global values.

 

Examples

Visual Basic.Net

'Method GetUserByName

User = ftObj.GetUserByName("FuseTalkUser", ForumID)

MsgBox(User.FirstName)

 

C#

//Method GetUserByName

User = ftObj.GetUserByName("FuseTalkUser", ForumID.Tostring());

Interaction.MsgBox(User.FirstName, 0, null);

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

GetUserSettings

GetUserSettings

This method gets the user settings for a user.

 

Return Type:  ftUser

 

Name

Type

Description

UserID

Integer

The user ID of the user.

ForumID

Integer

The forum ID the user belongs to.

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName,GetUserByID, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

InsertForumUser

InsertForumUser

This method inserts a user into a forum. The user is inserted into the ftdb_forumusers table for use in forum operations.

 

Return Type: Integer

 

Name

Type

Description

UserID

Integer

The ID of the user.

ForumID

Integer

 

UserTitle

String

The description for the user title for the user to insert.

AuthorIcon

String

The author icon for the user to insert.

LockPer

Integer

This value dictates if a user has access to a locked forum or not. 1 if the user has access, 0 if it does not.

 

Examples

Visual Basic.Net

'Method InsertForumUser

ftObj.InsertForumUser(User.ID, 2, "User Title", "default.gif", 0)

 

C#

//Method InsertForumUser

ftObj.InsertForumUser(User.ID, 2, "User Title", "default.gif", 0);

 

isOwner

isOwner

Check if a user is the owner of a forum, based on a forum ID.

 

Return Type: Boolean

 

Name

Type

Description

UserID

Integer

The user ID you want to check.

ForumID

Integer

The forum ID of the forum.

 

isOwner

isOwner

Check if a user is the owner of any forum.

 

Return Type: Boolean

 

Name

Type

Description

UserID

Integer

The user ID you want to check.

 

isUserInForum

isUserInForum

Checks if a user belongs to a forum. If he doesn't you can add the user with the InsertForumUser function.

 

Return Type:  Boolean

 

Name

Type

Description

UserID

Integer

The ID for the user.

ForumID

Integer

The ID of the forum.

 

Examples

Visual Basic.Net

'Method isUserInForum

Dim InForum As Boolean = ftObj.isUserInForum(User.ID, ForumID)

MsgBox(InForum)

 

C#

//Method isUserInForum

bool InForum = ftObj.isUserInForum(User.ID, ForumID);

Interaction.MsgBox(InForum, 0, null);

 

LoginGlobal

LoginGlobal

This method logins in a global admin user.

 

Return Type:  ftUser

 

Name

Type

Description

Username

String

The username for the user.

Password

String

The password for the user.

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName,GetUserByID, GetUserSettings, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

LoginUser

LoginUser

This method retrieves the forums that a user has access to. During the login process the user is validated for access to the forums, which includes if the user is banned.

 

Return Type:  ftUser

 

Name

Type

Description

UserName

String

The username for the user.

Password

String

The password for the user.

ForumID

Integer

The ID of the forum that the user belongs to.

 

Examples

Visual Basic.Net

'Method LoginUser

Dim MyUser As ftUser = ftObj.LoginUser("FuseTalkUser", "mypassword", ForumID)

MsgBox(MyUser.isLoggedIn)

 

C#

//Method LoginUser

FuseTalk.API.ftUser MyUser = ftObj.LoginUser("FuseTalkUser", "mypassword", ForumID);

Interaction.MsgBox(MyUser.isLoggedIn, 0, null);

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, GetTodayBirthDate, GetUserByName,GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

LoginUser

LoginUser

This method retrieves the forums that a user has access to. During the login process the user is validated for access to the forums, which includes if the user is banned.

 

Return Type:  ftUser

 

Name

Type

Description

UserName

String

The username for the user.

Password

String

The password for the user.

ForumID

Integer

The ID of the forum that the user belongs to

Remember

Boolean

This dictates if the login cookie will be permanent or not.

SetCookie

Boolean

This function returns a query object containing the user's record.

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, GetTodayBirthDate, GetUserByName,GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

ResetUserPassword

ResetUserPassword

Resets a users password to a random generated value.

 

Return Type:  n/a

 

Name

Type

Description

UserID

Integer

The ID of the user that needs the password reset.

ForumID

Integer

The ID of the forum the user belongs to.

 

SearchUsersByAlphabet

SearchUsersByAlphabet

This method searches for users by an alphabet letter.

 

Return Type:  ftUser()

 

Name

Type

Description

Letter

String

The letter of the alphabet to search by, pass 'other' for non alphabet based usernames.

ForumID

Integer

The forum ID the user belongs to, if searching for a global user pass 0.

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName,GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByCriteria, SearchUsersByIPAddress

 

SearchUsersByCriteria

SearchUsersByCriteria

This method searches the database for a user by given criteria.

 

Return Type:  ftUser()

 

Name

Type

Description

SearchBy

String

What you want to search by, valid search by types are: u (vchnickname), (vchfirstname), l (vchlastname), e (vchemailaddress), p (vchpassword), c (vchcity).

SortBy

String

What you want to sort the search results by, valid sort types are: u (vchnickname), f (vchfirstname), l (vchlastname), e (vchemailaddress), d (dtinsertdate).

SortCriteria

String

What order to list the results in, ascending, descending? Valid sort orders are: asc, desc.

Keyword

String

The keyword to search on.

StartDate

String

The start date to filter results for. Uses the dtinsertdate field to filter.

EndDate

String

The end date to filter results for. Uses the dtinsertdate field to filter.

ForumID

Integer

The forum ID the user belongs to, if searching for a global user pass 0.

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName,GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByIPAddress

 

SearchUsersByIPAddress

SearchUsersByIPAddress

This method searches for users by IP address.

 

Return Type:  ftUser()

 

Name

Type

Description

SearchBy

String

What you want to search by, valid search by types are: u (vchnickname), (vchfirstname), l (vchlastname), e (vchemailaddress), p (vchpassword), c (vchcity).

SortBy

String

What you want to sort the search results by, valid sort types are: u (vchnickname), f (vchfirstname), l (vchlastname), e (vchemailaddress), d (dtinsertdate).

SortCriteria

String

What order to list the results in, ascending, descending? Valid sort orders are: asc, desc.

Keyword

String

The keyword to search on (IP Address).

StartDate

String

The start date to filter results for. Uses the dtinsertdate field to filter.

EndDate

String

The end date to filter results for. Uses the dtinsertdate field to filter.

ForumID

Integer

The forum ID the user belongs to, if searching for a global user pass 0.

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetThreadAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName,GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria

 

SetSecretInfo

SetSecretInfo

Set the secret answer of a user.

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

The ID of the user.

ForumID

Integer

The ID of the forum the user belongs to.

SecretQuestion

Integer

The secret question. The secret questions are part of the dictionary. This value should be a word id.

SecretAnswer

String

The answer the user has chosen.

 

UpdateLastVisitedDate

UpdateLastVisitedDate

This method updates the last visited date for a forum user.

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

The user ID of the user.

Email

String

The E-mail address for the user.

CatID

Integer

The category ID that the user was in. (allows users to mark categories read)

 

UpdateUser

UpdateUser

This method updates an existing user.

 

Return Type: Integer

 

Name

Type

Description

u

ftUser

The user you wish to update.

VerifyPass

String

This is the password for the user (second verification).

ForumID

Integer

This is the forum ID that the user belongs to.

Section

String

This field indicates where the user is being updated from, globaladmin, forum, or admin.

 

Examples

Visual Basic.Net

'Method UpdateUser

ftObj.UpdateUser(User, "mypassword", ForumID, "forum")

 

C#

//Method UpdateUser

ftObj.UpdateUser(User, "mypassword", ForumID, "forum");

 

UpdateUserPostcount

UpdateUserPostcount

This method updates a user's post count and user title.

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

The user ID for the user.

ForumID

Integer

The forum ID the user belongs to.

 

UpdateUserSetting

UpdateUserSetting

This method updates a users setting.

 

Return Type: n/a

 

Name

Type

Description

SettingName

String

The name for the setting. (From the ftdb_usersettings table)

SettingValue

String

The value of the setting.

UserID

Integer

The ID for the user to update.