-
Notifications
You must be signed in to change notification settings - Fork 69
[1.2.x][IGCN] Add account to T_InGameShop_Point automatically
Lautaro Angelico edited this page Dec 8, 2020
·
1 revision
This is a modification for WebEngine 1.2.x that will automatically add accounts to the T_InGameShop_Point table so your accounts can receive credits through the WebEngine credit system even if they have not logged into the game yet.
Requirements:
- WebEngine 1.2.x
- IGCN Mu FIles (or similar files that use the T_InGameShop_Point table)
Step 1:
- Open /modules/usercp.php
Step 2:
- Replace all the code with the following:
<?php
/**
* WebEngine CMS
* https://webenginecms.org/
*
* @version 1.2.x
* @author Lautaro Angelico <http://lautaroangelico.com/>
* @copyright (c) 2013-2020 Lautaro Angelico, All Rights Reserved
*
* Licensed under the MIT license
* http://opensource.org/licenses/MIT
*/
if(!isLoggedIn()) redirect(1,'login');
$db = Connection::Database('MuOnline');
$check = $db->query_fetch_single("SELECT * FROM T_InGameShop_Point WHERE AccountID = ?", array($_SESSION['username']));
if(!is_array($check)) {
$create = $db->query("INSERT INTO T_InGameShop_Point (AccountID, WCoin, GoblinPoint) VALUES (?, 0, 0)", array($_SESSION['username']));
}
# redirect to my account
redirect(1, 'usercp/myaccount');