Add PHP Script to activate account
This commit is contained in:
parent
e86ec4dfb1
commit
579939a5f8
6 changed files with 102 additions and 9 deletions
24
php/ActivateUser.php
Normal file
24
php/ActivateUser.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
if(!defined("COMMON"))
|
||||
require("Common.php");
|
||||
|
||||
$js = getJsonizedInput();
|
||||
$DB = get_DB();
|
||||
|
||||
$clientKey = $js['client'];
|
||||
$id = $js['id'];
|
||||
|
||||
$complete=false;
|
||||
if($clientKey == md5(CLIENTPSK)) {
|
||||
$complete=true;
|
||||
$res = $DB->query("UPDATE `UserAccounts` SET `active`=1 WHERE `PrincipalID` = '$id';");
|
||||
}
|
||||
|
||||
|
||||
die(json_encode(array(
|
||||
"done" => $complete,
|
||||
"type" => "S2CSimpleReply"
|
||||
)));
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue