diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-02-17 05:30:24 +0000 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-02-17 05:30:24 +0000 |
commit | 6a8b80d892984d51aaaa29cc5db3fda8ee94ad5e (patch) | |
tree | 9c4d5ec92558d0fbd7b654022f289e3b59da50f4 | |
parent | a5b17647a6524f19172a71696c95c9672e8dd35e (diff) |
Adding a private key. Based on Drupal 6's drupal_get_private_key() method.
-rw-r--r-- | core/helpers/access.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php index 573118b5..9bf9da6c 100644 --- a/core/helpers/access.php +++ b/core/helpers/access.php @@ -588,4 +588,12 @@ class access_Core { } } } + + static function private_key() { + if (!($key = module::get_var('core', 'private_key'))) { + $key = md5(uniqid(mt_rand(), true)) . md5(uniqid(mt_rand(), true)); + module::set_var('core', 'private_key', $key); + } + return $key; + } } |