/
book_auth.php
executable file
·42 lines (35 loc) · 1.13 KB
/
book_auth.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
include_once("xorc/mvc/xorc_auth.class.php");
class Book_auth extends Xorc_Auth{
public $name;
public $id;
public $msg_logout="Vielen Dank, dass sie vorbeigeschaut haben. Sie sind jetzt ausgeloggt.";
function chekk_login(){
$xorcuser=$_REQUEST['xorcuser'];
$xorcpass=$_REQUEST['xorcpass'];
if($xorcuser && $xorcpass){
$user=User::i()->find_by_email($xorcuser);
if($user && $user->check_password($xorcpass)){
if($user->check_status()){
$this->name=$user->fname." ".$user->lname;
$this->id=$user->id;
$user->after_login();
return array(true, "OK");
}else{
return array(false,
"Ihre E-Mail-Adresse ist noch nicht bestätigt. Bitte klicken Sie auf den Link, den wir Ihnen zugesendet haben.");
}
}else{
return array(false,
"Die E-Mail-Adresse und / oder das Passwort sind nicht korrekt! ".
"Bitte überprüfen sie auch die Groß oder Kleinschreibung des Passworts.");
}
}else{
return array(false, "Bitte geben sie ihre E-Mail-Adresse und ihr Passwort ein.");
}
}
function get_userobject(){
return User::i()->find($this->id);
}
}
?>