removeAccount
Client-side
Server-side
Shared
Pair: addAccount
This function is used to delete existing player accounts.
OOP Syntax Help! I don't understand this!
- Method:account:remove(...)
Syntax
bool removeAccount ( account theAccount )Required arguments
- theAccount: The account you wish to remove.
Returns
Returns true if account was successfully removed, false if the account does not exist.
- bool: result
Code Examples
server
This example deletes the specified account when the deregister command is entered.
function onCmdDeregister(playerSource, commandName) -- grab the account local sourceAccount = getPlayerAccount(playerSource) if (sourceAccount) then removeAccount(sourceAccount) outputChatBox("Account deregistered for " .. getPlayerName(playerSource), playerSource) else outputChatBox("Unable to get your account, make sure you are logged in", playerSource) endendaddCommandHandler("deregister", onCmdDeregister)See Also
Account Functions
- addAccount
- copyAccountData
- getAccount
- getAccountByID
- getAccountData
- getAccountID
- getAccountIP
- getAccountName
- getAccountPlayer
- getAccounts
- getAccountsByData
- getAccountsByIP
- getAccountsBySerial
- getAccountSerial
- getAccountTypeNew
- getAllAccountData
- getPlayerAccount
- isGuestAccount
- logIn
- logOut
- removeAccount
- setAccountData
- setAccountName
- setAccountPassword
- setAccountSerialNew