1 | <?php |
---|
2 | |
---|
3 | class user{ |
---|
4 | |
---|
5 | function get_user(){ |
---|
6 | |
---|
7 | return "<br><font color='blue'>GET USER</font>". |
---|
8 | "<br>usuario =".$_SESSION['phpgw_info']['expressomail']['user']['userid']. |
---|
9 | "<br>senha =".$_SESSION['phpgw_info']['expressomail']['user']['passwd']; |
---|
10 | } |
---|
11 | |
---|
12 | function verify_user($params){ |
---|
13 | |
---|
14 | $userId = $params['userid']; |
---|
15 | $delay = $params['delay']; |
---|
16 | |
---|
17 | if($delay) |
---|
18 | sleep($delay); |
---|
19 | |
---|
20 | $result = ''; |
---|
21 | |
---|
22 | if($userId == $_SESSION['phpgw_info']['expressomail']['user']['userid']) |
---|
23 | $result = '<br><font color="green">VERIFY USER ... VERIFIED</font>'; |
---|
24 | else |
---|
25 | $result = '<br><font color="red">VERIFY USER ... NOT VERIFIED</font>'; |
---|
26 | |
---|
27 | return $result; |
---|
28 | } |
---|
29 | |
---|
30 | function verify_user_get($params){ |
---|
31 | |
---|
32 | return $params; |
---|
33 | } |
---|
34 | |
---|
35 | function verify_user_post($params){ |
---|
36 | |
---|
37 | return $this -> verify_user($params); |
---|
38 | } |
---|
39 | |
---|
40 | function get_email(){ |
---|
41 | return $_SESSION['phpgw_info']['expressomail']['user']['email']; |
---|
42 | } |
---|
43 | |
---|
44 | |
---|
45 | //MailArchiver login validate operations |
---|
46 | function get_mailarchiver_authid(){ |
---|
47 | if((isset($_COOKIE["BALANCEID"])) && ($_COOKIE["BALANCEID"] != null) && ($_COOKIE["BALANCEID"] != " ")) |
---|
48 | $cookie_balancer = $_COOKIE["BALANCEID"]; |
---|
49 | else |
---|
50 | $cookie_balancer = ""; |
---|
51 | if((isset($_COOKIE["sessionid"])) && ($_COOKIE["sessionid"] != null) && ($_COOKIE["sessionid"] != " ")) |
---|
52 | $cookie_session = $_COOKIE["sessionid"]; |
---|
53 | else |
---|
54 | $cookie_session = ""; |
---|
55 | if(isset($_SESSION['phpgw_info']['expressomail']['user']['userid']) && ($_SESSION['phpgw_info']['expressomail']['user']['userid'] != null) && ($_SESSION['phpgw_info']['expressomail']['user']['userid'] != " ")) |
---|
56 | $cookie_user = $_SESSION['phpgw_info']['expressomail']['user']['userid']; |
---|
57 | else |
---|
58 | $cookie_user = ""; |
---|
59 | |
---|
60 | if(isset($_SESSION['phpgw_info']['expressomail']['user']['passwd']) && ($_SESSION['phpgw_info']['expressomail']['user']['passwd'] != null) && ($_SESSION['phpgw_info']['expressomail']['user']['passwd'] != " ")) |
---|
61 | $cookie_pass = $_SESSION['phpgw_info']['expressomail']['user']['passwd']; |
---|
62 | else |
---|
63 | $cookie_pass = ""; |
---|
64 | |
---|
65 | return(array($cookie_balancer, $cookie_session, $cookie_user, $cookie_pass)); |
---|
66 | } |
---|
67 | |
---|
68 | } |
---|
69 | ?> |
---|