Jump to content

Recommended Posts

####### English Version ########

Hello Everyone!.

I am requesting a script to change username in php, someone would be so kind as to contribute?.

Thanks in advance


###### Version Español ######

Hola a todos.

Estoy necesitando un codigo php para cambiar el nombre de usuario, alguno podria aportarlo?

se los agradeceria mucho. saludos!


Version: TrinityCore 3.3.5a.

Link to comment
Share on other sites

  • 4 months later...

I can't guarantee this would work right because of how TC handles logins, but in theory 

class Account {

                  public function __construct() {

                              $this->db = new db();


                  public function ChangeUsername($arg, $arg2) {

                              $userup = strtoupper($arg);

                              $passup = strtoupper($arg2);

                              $query = <<<SQL

                              UPDATE account

                              SET username = :arg

                              AND sha_pass_hash = :arg2


                             $resource = $this->db->db->prepare( $query );

                             $resource->execute( array (

                              ":arg" => $userup,

                              ":arg2" => sha1($userup.':'.$passup),



Simply Define Your Database Connection and then call the script with 

$account = new Account();


This is a very rough draft, but if you know what you're doing with any of the code then it wouldn't be hard to implement. However I can't say I would recommend it regardless.


Link to comment
Share on other sites


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By PavelFreeman
      Hello, I want to compile Trinity, but I get this errors...

      Did everything according to the documentation (https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130077/Installation+Guide) for Windows 10.

      Visual Studio 2019.
    • By WalkerSh
      I am going through a big problem.
      all maps in "BFa" are completely empty. (without "mobs", without "Npc's".
      how can I enable world missions and all the content in "BFa".  ??????????????????????
      I looked everywhere on this subject, but I was unsuccessful.
      I apologize, I am a beginner in the projects.

      I am currently using this project. 8.3.0 (33369)
      updated to 8.3.7 (35662)
      Source project

      My WorldServ.conf
      #    Expansion
      #        Description: Allow server to use content from expansions. Checks for expansion-related
      #                     map files, client compatibility and class/race character creation.
      #        Default:     7 - (Expansion 7)
      #                     6 - (Expansion 6)
      #                     5 - (Expansion 5)
      #                     4 - (Expansion 4)
      #                     3 - (Expansion 3)
      #                     2 - (Expansion 2)
      #                     1 - (Expansion 1)
      #                     0 - (Disabled, Ignore and disable expansion content (maps, races, classes)
      Expansion = 8
    • By Kylezzz101
      while running cmake im running in to an issue after looking online and im not experienced with a few of these programs. I am unable to find a solution to this problem. and i went through and re setup all the programs to make sure i did everything correct following the requirements and now on the core installation.  Feel free to message me if you have some time to help me out and hopefully create a solution that others can use on this thread. my discord user is kylezzz101#3942. if you need more information ill post the full log on pastebin.
      Determining if the include file pthread.h exists failed with the following output:
      Change Dir: C:/Wow server/build/CMakeFiles/CMakeTmp
      Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_a4eb6.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
      Copyright (C) Microsoft Corporation. All rights reserved.

        Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27035 for x86
        Copyright (C) Microsoft Corporation.  All rights reserved.
        cl /c /Zi /W1 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_a4eb6.dir\Debug\\" /Fd"cmTC_a4eb6.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Wow server\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c"
      C:\Wow server\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Wow server\build\CMakeFiles\CMakeTmp\cmTC_a4eb6.vcxproj]
    • By Destro
      Hello guys how ot make a new account gm level 4 ? I am asking because SOAP needs account level 4 and i know only the console is level 4, so how to create new account for soap and make it GM Level 4 ?
      I am using TrinityCore
      PP: i tryed to see the topic with question but
      Sorry, there is a problem
      We could not locate the item you are trying to view.
    • By kepo
      I made 2 realms, one for 2.4.3, one for 3.3.5 but for some reason when I try to connect to the 3.3.5 realm I'm getting this error in the cosole: 
      WorldSocket::HandleAuthSession: Client *my home pc's ip is here* requested connecting with realm id 22 but this realm has id 2 set in config. I also get this in-game: 
      The game server you have chosen is currently down. Use the Change Realm button to choose another Realm. The Auth.exe that I use is by OregonCore 2.4.3 for both, but Oregon is 50-60% TrinityCore. When I use the auth.exe by TrinityCore the same problem occurs in the 2.4.3 realm but the 3.3.5 starts working. I don't have any other errors like DB & etc. That's the only problem. 
      I checked the DB auth > realmist and everything looks fine. Here's a picture: http://prntscr.com/mhpbmr
      I have also opened all the needed ports.
      Also - worldconfig for 3.3.5:
      LoginDatabaseInfo     = ";3306;mysql user;mysql pass;auth" WorldDatabaseInfo     = ";3306;mysql user;mysql pass;world2" CharacterDatabaseInfo = ";3306;mysql user;mysql pass;characters2" RealmID = 2 WorldServerPort = 8086 and for 2.4.3
      LoginDatabaseInfo     = ";3306;mysql user;mysql pass;auth" WorldDatabaseInfo     = ";3306;mysql user;mysql pass;world" CharacterDatabaseInfo = ";3306;mysql user;mysql pass;characters" RealmID = 1 WorldServerPort = 8085 Also I checked the AuthSocket.cpp and realmlist.cpp, it looks like there is a code or whatever is called for 3.3.5:
          case 8606:                                          // 2.4.3     case 10505:                                         // 3.2.2a     case 11159:                                         // 3.3.0a     case 11403:                                         // 3.3.2     case 11723:                                         // 3.3.3a     case 12340:                                         // 3.3.5a realmlist.cpp
      static RealmBuildInfo ExpectedRealmdClientBuilds[] = {     {12340, 3, 3, 5, 'a'},                                  // highest supported build, also auto accept all above for simplify future supported builds testing     {11723, 3, 3, 3, 'a'},     {11403, 3, 3, 2, ' '},     {11159, 3, 3, 0, 'a'},     {10505, 3, 2, 2, 'a'},     {8606,  2, 4, 3, ' '},     {6005,  1,12, 2, ' '},     {5875,  1,12, 1, ' '},     {0,     0, 0, 0, ' '}                                   // terminator }; My account's gmlevel in account_access is set to '3' and 'RealmID: is 2', since the max rank level in 2.4.3 (RealmID: 1) is '5'.
      Oh, almost forgot... I modified accounts table, also fusioncms recognize the realm: http://prntscr.com/mhpf3f // trinity is fresh-compiled soo... it's latest version, oregon is 2017 rev since we did tons of custom changes (it's fun server) but hey.. oregon is ded - latest rev is 1 year ago. ;c
  • Create New...