1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00
php-e107/e107_handlers/user_func.php

51 lines
1.0 KiB
PHP
Raw Normal View History

2006-12-02 04:36:16 +00:00
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <EFBFBD>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/user_func.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:59 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
function e107_userGetuserclass($user_id)
{
global $cachevar;
$key = 'userclass_'.$user_id;
$val = getcachedvars($key);
if ($val)
{
return $cachevar[$key];
}
else
{
$uc_sql = new db;
if ($uc_sql->db_Select("user", "user_class, user_admin", "user_id=".intval($user_id)))
{
$row = $uc_sql->db_Fetch();
$uc = $row['user_class'];
$uc .= ",".e_UC_MEMBER;
if($row['user_admin'])
{
$uc .= ",".e_UC_ADMIN;
}
return $uc;
}
else
{
return "";
}
}
}
?>