summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt3
-rw-r--r--includes/bootstrap.inc2
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 0397e258a..f7e7a739d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,9 @@
Drupal 7.25, xxxx-xx-xx (development version)
-----------------------
+- Added a 'drupal_anonymous_user_object' variable to allow the anonymous user
+ object returned by drupal_anonymous_user() to be overridden with a classed
+ object (API addition).
- Changed the database API to allow inserts based on a SELECT * query to work
correctly.
- Changed the database schema of the {file_managed} table to allow Drupal to
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 1c8b5c72d..7a4493991 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -2149,7 +2149,7 @@ function drupal_array_merge_deep_array($arrays) {
* @return Object - the user object.
*/
function drupal_anonymous_user() {
- $user = new stdClass();
+ $user = variable_get('drupal_anonymous_user_object', new stdClass);
$user->uid = 0;
$user->hostname = ip_address();
$user->roles = array();