Last active
June 6, 2016 14:22
-
-
Save benmmurphy/83ea5ebb94114e418f1fd6ffa1632631 to your computer and use it in GitHub Desktop.
zensend verify step 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$verify = new ZenSend\Verify(API_KEY); | |
$username = $_POST["username"]; | |
$user = USERS[$username]; | |
if ($user && $user["password"] == $_POST["password"]) { | |
session_start(); | |
$_SESSION["username"] = $username; | |
$options = new ZenSend\VerifyOptions(); | |
$options->message = "{{token}} is your COMPANY verification code"; | |
$options->originator = "YOURCOMPANY"; | |
$verify->create_session($user["msisdn"], $options); | |
header("Location: /msisdn_verify.php"); | |
} else { | |
$error = "Invalid username or password"; | |
require 'login_form.inc'; | |
return; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment