本文整理汇总了PHP中Teacher::validateLogin方法的典型用法代码示例。如果您正苦于以下问题:PHP Teacher::validateLogin方法的具体用法?PHP Teacher::validateLogin怎么用?PHP Teacher::validateLogin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Teacher
的用法示例。
在下文中一共展示了Teacher::validateLogin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Validate
$validate = new Validate();
$validation = $validate->check($_POST, array('a' => array('required' => true), 'b' => array('required' => true), 'g-recaptcha-response' => array('required' => true)));
if ($validate->passed()) {
$captcha_check = new Recaptcha();
$ver = $captcha_check->verifyResponse();
if ($ver->success) {
//verify captcha
if (validateEmail(Input::get('a'))) {
$ldap = new LDAP();
if ($ldap->Auth(Input::get('a'), Input::get('b')) && Token::check(Input::get('token'))) {
// verify using LDAP and check token!!
if (Session::get('type') === 'faculty') {
//check who logged in, differentiating between student and faculty members' login!
//case for teacher's or other staff's login
$teacher = new Teacher();
$v = $teacher->validateLogin(Input::get('a'));
if ($v == 1) {
$cookiename = 'misnootp' . $teacher->getMobile();
if (1) {
Session::put('loggedIn', 1);
$log = new Log();
$log->loginLog('success');
Redirect::to('home.php');
} else {
$otp = new OTP();
if ($otp->send($teacher->getMobile())) {
//$otp->send($teacher->getMobile()) //Send OTP
Session::put('OTP Sending', 'OTP Sent, Verify Here');
}
}
unset($cookiename);