1 | <?php |
---|
2 | /*************************************************************************** |
---|
3 | * Expresso Livre * |
---|
4 | * http://www.expressolivre.org * |
---|
5 | * -------------------------------------------- * |
---|
6 | * This program is free software; you can redistribute it and/or modify it * |
---|
7 | * under the terms of the GNU General Public License as published by the * |
---|
8 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
9 | * option) any later version. * |
---|
10 | \**************************************************************************/ |
---|
11 | |
---|
12 | class user{ |
---|
13 | |
---|
14 | function get_user(){ |
---|
15 | |
---|
16 | return "<br><font color='blue'>GET USER</font>". |
---|
17 | "<br>usuario =".$_SESSION['phpgw_info']['expressomail']['user']['userid']. |
---|
18 | "<br>senha =".$_SESSION['phpgw_info']['expressomail']['user']['passwd']; |
---|
19 | } |
---|
20 | |
---|
21 | function verify_user($params){ |
---|
22 | |
---|
23 | $userId = $params['userid']; |
---|
24 | $delay = $params['delay']; |
---|
25 | |
---|
26 | if($delay) |
---|
27 | sleep($delay); |
---|
28 | |
---|
29 | $result = ''; |
---|
30 | |
---|
31 | if($userId == $_SESSION['phpgw_info']['expressomail']['user']['userid']) |
---|
32 | $result = '<br><font color="green">VERIFY USER ... VERIFIED</font>'; |
---|
33 | else |
---|
34 | $result = '<br><font color="red">VERIFY USER ... NOT VERIFIED</font>'; |
---|
35 | |
---|
36 | return $result; |
---|
37 | } |
---|
38 | |
---|
39 | function verify_user_get($params){ |
---|
40 | |
---|
41 | return $params; |
---|
42 | } |
---|
43 | |
---|
44 | function verify_user_post($params){ |
---|
45 | |
---|
46 | return $this -> verify_user($params); |
---|
47 | } |
---|
48 | |
---|
49 | function get_email(){ |
---|
50 | return $_SESSION['phpgw_info']['expressomail']['user']['email']; |
---|
51 | } |
---|
52 | |
---|
53 | //MailArchiver login validate operations |
---|
54 | function get_mailarchiver_authid(){ |
---|
55 | if((isset($_COOKIE["BALANCEID"])) && ($_COOKIE["BALANCEID"] != null) && ($_COOKIE["BALANCEID"] != " ")) |
---|
56 | $cookie_balancer = $_COOKIE["BALANCEID"]; |
---|
57 | else |
---|
58 | $cookie_balancer = ""; |
---|
59 | if((isset($_COOKIE["sessionid"])) && ($_COOKIE["sessionid"] != null) && ($_COOKIE["sessionid"] != " ")) |
---|
60 | $cookie_session = $_COOKIE["sessionid"]; |
---|
61 | else |
---|
62 | $cookie_session = ""; |
---|
63 | if(isset($_SESSION['phpgw_info']['expressomail']['user']['userid']) && ($_SESSION['phpgw_info']['expressomail']['user']['userid'] != null) && ($_SESSION['phpgw_info']['expressomail']['user']['userid'] != " ")) |
---|
64 | $cookie_user = $_SESSION['phpgw_info']['expressomail']['user']['userid']; |
---|
65 | else |
---|
66 | $cookie_user = ""; |
---|
67 | |
---|
68 | if(isset($_SESSION['phpgw_info']['expressomail']['user']['passwd']) && ($_SESSION['phpgw_info']['expressomail']['user']['passwd'] != null) && ($_SESSION['phpgw_info']['expressomail']['user']['passwd'] != " ")) |
---|
69 | $cookie_pass = $_SESSION['phpgw_info']['expressomail']['user']['passwd']; |
---|
70 | else |
---|
71 | $cookie_pass = ""; |
---|
72 | |
---|
73 | return(array($cookie_balancer, $cookie_session, $cookie_user, $cookie_pass)); |
---|
74 | } |
---|
75 | |
---|
76 | } |
---|
77 | ?> |
---|