summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-26 10:27:19 +0100
committerAleksander Machniak <alec@alec.pl>2012-11-26 10:27:19 +0100
commit5b06e24265ca9dfcb9ced320b8f78716372fcc56 (patch)
treecf6401da057b53ba42c4f51045f35bc6962a4f79 /program/lib/Roundcube/rcube.php
parent789e5988aaebb78d368b137b98169ec1e616159c (diff)
Cleaner way of handling user password in framework-based programs with no session
Diffstat (limited to 'program/lib/Roundcube/rcube.php')
-rw-r--r--program/lib/Roundcube/rcube.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index 27e10a918..c798465ed 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -1220,6 +1220,22 @@ class rcube
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']);
+ }
+ }
}