summary refs log tree commit diff stats
path: root/includes/session.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/session.php')
-rwxr-xr-xincludes/session.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/includes/session.php b/includes/session.php index 19ad24e..94c919a 100755 --- a/includes/session.php +++ b/includes/session.php
@@ -38,6 +38,24 @@ function getSessionID()
38 return false; 38 return false;
39} 39}
40 40
41function getSessionUserID()
42{
43 $getconfig = "SELECT * FROM phpbb_config WHERE config_name LIKE \"cookie_name\"";
44 $getconfig2 = mysql_query($getconfig);
45 $getconfig3 = mysql_fetch_array($getconfig2);
46
47 if (isset($_COOKIE[$getconfig3['config_value'] . '_sid']))
48 {
49 $getsession = "SELECT * FROM phpbb_sessions WHERE session_id LIKE \"" . mysql_real_escape_string($_COOKIE[$getconfig3['config_value'] . '_sid']) . "\"";
50 $getsession2 = mysql_query($getsession) or die($getsession);
51 $getsession3 = mysql_fetch_array($getsession2);
52
53 return $getsession3['session_user_id'];
54 }
55
56 return false;
57}
58
41function getSessionUsername() 59function getSessionUsername()
42{ 60{
43 $getconfig = "SELECT * FROM phpbb_config WHERE config_name LIKE \"cookie_name\""; 61 $getconfig = "SELECT * FROM phpbb_config WHERE config_name LIKE \"cookie_name\"";