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
- bool: result
Returns true if account was successfully removed, false if the account does not exist.
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 )  endend
addCommandHandler("deregister",onCmdDeregister)See Also
Account Functions
- addAccount
- copyAccountData
- getAccount
- getAccountData
- getAccountByID
- getAccountIP
- getAccountID
- getAccountName
- getAccountPlayer
- getAccountType
- getAccountSerial
- getAccounts
- getAccountsByData
- getAccountsByIP
- getAccountsBySerial
- getAllAccountData
- isGuestAccount
- getPlayerAccount
- logIn
- logOut
- removeAccount
- setAccountData
- setAccountName
- setAccountPassword
- setAccountSerial
 
 