summaryrefslogtreecommitdiff
path: root/includes/funktion_user.php
diff options
context:
space:
mode:
authorAngelo Cuccato <cuccato@web.de>2010-01-13 00:07:42 +0100
committerAngelo Cuccato <cuccato@web.de>2010-01-13 00:07:42 +0100
commit93e0fc9705ec2fa8210748be1a56028c0d7c4379 (patch)
tree439ca9216a47f8eb3bf9534426c458775e2afe71 /includes/funktion_user.php
parent49858dba14bfecc60f107b2ab448b69d967f5c2e (diff)
add group functions
Diffstat (limited to 'includes/funktion_user.php')
-rwxr-xr-xincludes/funktion_user.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/includes/funktion_user.php b/includes/funktion_user.php
index bcb77778..742b2624 100755
--- a/includes/funktion_user.php
+++ b/includes/funktion_user.php
@@ -3,15 +3,22 @@
function UID2Nick($UID)
{
global $con;
-
- $SQL = "SELECT Nick FROM `User` WHERE UID='$UID'";
+
+ if( $UID>0) {
+ $SQL = "SELECT Nick FROM `User` WHERE UID='$UID'";
+ } else {
+ $SQL = "SELECT Name FROM `UserGroups` WHERE UID='$UID'";
+ }
$Erg = mysql_query($SQL, $con);
//echo $UID."#";
- if( mysql_num_rows($Erg))
- return mysql_result($Erg, 0);
- else
- {
+ if( mysql_num_rows($Erg)) {
+ if( $UID>0 ) {
+ return mysql_result($Erg, 0);
+ } else {
+ return "Group-".mysql_result($Erg, 0);
+ }
+ } else {
if( $UID == -1)
return "logout User";
else