From a2b435165186bd27bb3b26f932e9aabf3ffcda77 Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Wed, 19 Oct 2011 08:51:02 +0000 Subject: [PATCH] =?UTF-8?q?check=5Fuser()=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/functions.inc.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/functions.inc.php b/include/functions.inc.php index 4759410cc..8c2f326d4 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -921,4 +921,25 @@ function setSprache($sprache) $_SESSION['sprache']=$sprache; setcookie('sprache',$sprache,time()+60*60*24*30,'/'); } + + +function check_user($username, $passwort) +{ + if($username=='') + { + $user = get_uid(); + if($user=='') + return false; + return $user; + } + else + { + if(!checkldapuser($username,$passwort)) + return false; + else + return $username; + } +} + + ?>