TrinityCore
AccountMgr Class Reference

#include <AccountMgr.h>

Public Member Functions

AccountOpResult CreateAccount (std::string username, std::string password, std::string email="", uint32 bnetAccountId=0, uint8 bnetIndex=0)
 
void UpdateAccountAccess (rbac::RBACData *rbac, uint32 accountId, uint8 securityLevel, int32 realmId)
 
void LoadRBAC ()
 
rbac::RBACPermission const * GetRBACPermission (uint32 permission) const
 
rbac::RBACPermissionsContainer const & GetRBACPermissionList () const
 
rbac::RBACPermissionContainer const & GetRBACDefaultPermissions (uint8 secLevel)
 

Static Public Member Functions

static AccountMgrinstance ()
 
static AccountOpResult DeleteAccount (uint32 accountId)
 
static AccountOpResult ChangeUsername (uint32 accountId, std::string newUsername, std::string newPassword)
 
static AccountOpResult ChangePassword (uint32 accountId, std::string newPassword)
 
static AccountOpResult ChangeEmail (uint32 accountId, std::string newEmail)
 
static AccountOpResult ChangeRegEmail (uint32 accountId, std::string newEmail)
 
static bool CheckPassword (std::string username, std::string password)
 
static bool CheckPassword (uint32 accountId, std::string password)
 
static bool CheckEmail (uint32 accountId, std::string newEmail)
 
static uint32 GetId (std::string_view username)
 
static uint32 GetSecurity (uint32 accountId, int32 realmId)
 
static QueryCallback GetSecurityAsync (uint32 accountId, int32 realmId, std::function< void(uint32)> callback)
 
static bool GetName (uint32 accountId, std::string &name)
 
static bool GetEmail (uint32 accountId, std::string &email)
 
static uint32 GetCharactersCount (uint32 accountId)
 
static bool IsBannedAccount (std::string const &name)
 
static bool IsPlayerAccount (uint32 gmlevel)
 
static bool IsAdminAccount (uint32 gmlevel)
 
static bool IsConsoleAccount (uint32 gmlevel)
 
static bool HasPermission (uint32 accountId, uint32 permission, uint32 realmId)
 

Private Member Functions

 AccountMgr ()
 
 ~AccountMgr ()
 
void ClearRBAC ()
 

Private Attributes

rbac::RBACPermissionsContainer _permissions
 
rbac::RBACDefaultPermissionsContainer _defaultPermissions
 

Detailed Description

Definition at line 52 of file AccountMgr.h.

Constructor & Destructor Documentation

◆ AccountMgr()

AccountMgr::AccountMgr ( )
private

Definition at line 34 of file AccountMgr.cpp.

◆ ~AccountMgr()

AccountMgr::~AccountMgr ( )
private

Definition at line 36 of file AccountMgr.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ ChangeEmail()

AccountOpResult AccountMgr::ChangeEmail ( uint32  accountId,
std::string  newEmail 
)
static

Definition at line 229 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ChangePassword()

AccountOpResult AccountMgr::ChangePassword ( uint32  accountId,
std::string  newPassword 
)
static

Definition at line 199 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ChangeRegEmail()

AccountOpResult AccountMgr::ChangeRegEmail ( uint32  accountId,
std::string  newEmail 
)
static

Definition at line 259 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ChangeUsername()

AccountOpResult AccountMgr::ChangeUsername ( uint32  accountId,
std::string  newUsername,
std::string  newPassword 
)
static

Definition at line 165 of file AccountMgr.cpp.

+ Here is the call graph for this function:

◆ CheckEmail()

bool AccountMgr::CheckEmail ( uint32  accountId,
std::string  newEmail 
)
static

Definition at line 392 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckPassword() [1/2]

bool AccountMgr::CheckPassword ( std::string  username,
std::string  password 
)
static

Definition at line 349 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckPassword() [2/2]

bool AccountMgr::CheckPassword ( uint32  accountId,
std::string  password 
)
static

Definition at line 368 of file AccountMgr.cpp.

+ Here is the call graph for this function:

◆ ClearRBAC()

void AccountMgr::ClearRBAC ( )
private

Definition at line 594 of file AccountMgr.cpp.

+ Here is the caller graph for this function:

◆ CreateAccount()

AccountOpResult AccountMgr::CreateAccount ( std::string  username,
std::string  password,
std::string  email = "",
uint32  bnetAccountId = 0,
uint8  bnetIndex = 0 
)

Definition at line 47 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteAccount()

AccountOpResult AccountMgr::DeleteAccount ( uint32  accountId)
static

Definition at line 90 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCharactersCount()

uint32 AccountMgr::GetCharactersCount ( uint32  accountId)
static

Definition at line 409 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEmail()

bool AccountMgr::GetEmail ( uint32  accountId,
std::string &  email 
)
static

Definition at line 334 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetId()

uint32 AccountMgr::GetId ( std::string_view  username)
static

Definition at line 289 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetName()

bool AccountMgr::GetName ( uint32  accountId,
std::string &  name 
)
static

Definition at line 319 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRBACDefaultPermissions()

rbac::RBACPermissionContainer const & AccountMgr::GetRBACDefaultPermissions ( uint8  secLevel)

Definition at line 603 of file AccountMgr.cpp.

+ Here is the call graph for this function:

◆ GetRBACPermission()

rbac::RBACPermission const * AccountMgr::GetRBACPermission ( uint32  permission) const

Definition at line 567 of file AccountMgr.cpp.

◆ GetRBACPermissionList()

rbac::RBACPermissionsContainer const & AccountMgr::GetRBACPermissionList ( ) const
inline

Definition at line 89 of file AccountMgr.h.

◆ GetSecurity()

uint32 AccountMgr::GetSecurity ( uint32  accountId,
int32  realmId 
)
static

Definition at line 298 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSecurityAsync()

QueryCallback AccountMgr::GetSecurityAsync ( uint32  accountId,
int32  realmId,
std::function< void(uint32)>  callback 
)
static

Definition at line 308 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasPermission()

bool AccountMgr::HasPermission ( uint32  accountId,
uint32  permission,
uint32  realmId 
)
static

Definition at line 577 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instance()

AccountMgr * AccountMgr::instance ( )
static

Definition at line 41 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsAdminAccount()

bool AccountMgr::IsAdminAccount ( uint32  gmlevel)
static

Definition at line 436 of file AccountMgr.cpp.

◆ IsBannedAccount()

bool AccountMgr::IsBannedAccount ( std::string const &  name)
static

Definition at line 419 of file AccountMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsConsoleAccount()

bool AccountMgr::IsConsoleAccount ( uint32  gmlevel)
static

Definition at line 441 of file AccountMgr.cpp.

+ Here is the caller graph for this function:

◆ IsPlayerAccount()

bool AccountMgr::IsPlayerAccount ( uint32  gmlevel)
static

Definition at line 431 of file AccountMgr.cpp.

+ Here is the caller graph for this function:

◆ LoadRBAC()

void AccountMgr::LoadRBAC ( )

Definition at line 446 of file AccountMgr.cpp.

+ Here is the call graph for this function:

◆ UpdateAccountAccess()

void AccountMgr::UpdateAccountAccess ( rbac::RBACData rbac,
uint32  accountId,
uint8  securityLevel,
int32  realmId 
)

Definition at line 533 of file AccountMgr.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _defaultPermissions

rbac::RBACDefaultPermissionsContainer AccountMgr::_defaultPermissions
private

Definition at line 95 of file AccountMgr.h.

◆ _permissions

rbac::RBACPermissionsContainer AccountMgr::_permissions
private

Definition at line 94 of file AccountMgr.h.


The documentation for this class was generated from the following files: