diff --git a/framework/Core/lib/Horde/Session.php b/framework/Core/lib/Horde/Session.php
index 08fee53215f..25abba202c8 100644
--- a/framework/Core/lib/Horde/Session.php
+++ b/framework/Core/lib/Horde/Session.php
@@ -47,6 +47,7 @@ class Horde_Session
const NONCE_ID = 'session_nonce'; /* @since 2.11.0 */
const TOKEN_ID = 'session_token';
+ const UNIQUE_ID = 'unique_id'; /* @since 2.12.0 */
/**
* Maximum size of the pruneable data store.
@@ -579,6 +580,24 @@ public function checkNonce($nonce)
$this->set('horde', self::NONCE_ID, array_values($nonces));
}
+ /* Unique ID. */
+
+ /**
+ * Return a unique identifier for this session.
+ *
+ * @since 2.12.0
+ *
+ * @return string Unique ID.
+ */
+ public function getUniqueId()
+ {
+ if (($id = $this->get('horde', self::UNIQUE_ID)) === null) {
+ $id = strval(new Horde_Support_Randomid());
+ $this->set('horde', self::UNIQUE_ID, $id);
+ }
+
+ return $id;
+ }
/* Session object storage. */
diff --git a/framework/Core/package.xml b/framework/Core/package.xml
index 4ceb48527cf..d80be452f8a 100644
--- a/framework/Core/package.xml
+++ b/framework/Core/package.xml
@@ -39,6 +39,7 @@
LGPL-2.1
+* [mms] Add Horde_Session#getUniqueId().
* [mms] Add abstracted web notifications interface to the Horde_Notification system.
* [mms] Upgrade prototype.js to most recent git version (0df1298f807818471209b7e7971c3480e36a4f71).
* [mjr] Fix issue that causes enter to submit the form when inside the pretty autocompleter (Bug #12923).
@@ -3367,6 +3368,7 @@
2014-04-04
LGPL-2.1
+* [mms] Add Horde_Session#getUniqueId().
* [mms] Add abstracted web notifications interface to the Horde_Notification system.
* [mms] Upgrade prototype.js to most recent git version (0df1298f807818471209b7e7971c3480e36a4f71).
* [mjr] Fix issue that causes enter to submit the form when inside the pretty autocompleter (Bug #12923).