In the login module edit the public.php file around line 55.
Code: Select all
$_SESSION["userid"] = $result->fields[0];
$_SESSION["username"] = $result->fields[1];
$_SESSION["block"] = $result->fields[2];
$userId = $result->fields[0];
$result->Close();
Code: Select all
$_SESSION["userid"] = $result->fields[0];
$_SESSION["username"] = $result->fields[1];
$_SESSION["block"] = $result->fields[2];
//added to send email alerts when someone logs in
mail("somemail@somedomain.com","Someone has logged into the game!", $result->fields[1], Translate("The following player has logged into the game:"));
$userId = $result->fields[0];
$result->Close();