diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Session.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/system/libraries/Session.php b/system/libraries/Session.php index 0c8d46591..3a80c1626 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -469,6 +469,29 @@ class CI_Session { { return $this->userdata; } + + // -------------------------------------------------------------------------- + + /** + * Fetch all flashdata + * + * @return array + */ + public function all_flashdata() + { + $out = array(); + + // loop through all userdata + foreach ($this->all_userdata() as $key => $val) + { + // if it contains flashdata, add it + if (strpos($key, 'flash:old:') !== FALSE) + { + $out[$key] = $val; + } + } + return $out; + } // -------------------------------------------------------------------- |