auth: user method to retrieve configured email
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 12 Jul 2019 00:27:23 +0000 (02:27 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 12 Jul 2019 02:18:16 +0000 (04:18 +0200)
auth.inc.php

index 52cd4c1e29ababbce4ae3729f652617a247935d0..4d9b29e2a297f00e05184cdb954e54c802d1c958 100644 (file)
@@ -32,6 +32,11 @@ class User
                return $this->name ?: $this->login;
        }
 
+       function email()
+       {
+               return rtrim(@file_get_contents("{$this->dir}/email.txt"));
+       }
+
        function admin()
        {
                return @file_exists("{$this->dir}/.admin");