diff options
Diffstat (limited to 'program/lib/Roundcube/rcube.php')
-rw-r--r-- | program/lib/Roundcube/rcube.php | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index 0eed6cf67..c798465ed 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -1203,8 +1203,38 @@ class rcube if (is_object($this->user)) { return $this->user->get_username(); } + else if (isset($_SESSION['username'])) { + return $_SESSION['username']; + } + } - return null; + + /** + * Getter for logged user email (derived from user name not identity). + * + * @return string User email address + */ + public function get_user_email() + { + if (is_object($this->user)) { + return $this->user->get_username('mail'); + } + } + + + /** + * Getter for logged user password. + * + * @return string User password + */ + public function get_user_password() + { + if ($this->password) { + return $this->password; + } + else if ($_SESSION['password']) { + return $this->decrypt($_SESSION['password']); + } } } |