Code:
if($realm_db->query("INSERT INTO `account` (`username`,`sha_pass_hash`,`email`,`last_ip`,`locked`,`expansion`) VALUES (UPPER('".$username."'),SHA1(CONCAT(UPPER('".$username."'),':',UPPER('".$passw."'))),'".$email."','".$ip."','".$lock_acc."','".$expansion."')"))
This line is where you put the account into the database, if you take a look at the column names of the "account" table, you will notice the one for GM, in this SQL query you need to position into the query after where it is in the columns, E.G:
Code:
if($realm_db->query("INSERT INTO `account` (`username`,`sha_pass_hash`,`GM`,`email`,`last_ip`,`locked`,`expansion`) VALUES (UPPER('".$username."'),SHA1(CONCAT(UPPER('".$username."'),':',UPPER('".$passw."'))),'3','".$email."','".$ip."','".$lock_acc."','".$expansion."')"))
Now this itself wont work, as i dont know the column name for GM in Trinity, but just change the "GM" to the column name and it SHOULD work fine.