nieuws: toc option to prepend images
[minimedit.git] / auth.inc.php
index 631bf8b06cccb33f6e64bce65d217c29cdb50acf..65b7f72571b9123f036a39b845f82fa93e7fdb1e 100644 (file)
@@ -5,6 +5,9 @@ class User
 {
        function __construct($dir)
        {
+               if (!file_exists($dir)) {
+                       throw new Exception("Gebruiker niet gevonden in $dir");
+               }
                $this->dir = $dir;
                $this->login = basename($dir);
        }
@@ -16,7 +19,7 @@ class User
 
        function rawname()
        {
-               return @file_get_contents("{$this->dir}/name.txt");
+               return rtrim(@file_get_contents("{$this->dir}/name.txt"));
        }
 
        function name()