Commit 335b2dad authored by David_Rothstein's avatar David_Rothstein

Issue #1399798 by nevergone, amateescu, chriscohen: Add a variable to allow...

Issue #1399798 by nevergone, amateescu, chriscohen: Add a variable to allow the anonymous user object to not be a stdClass and to work around the fact that anonymous user properties are hardcoded.
parent cbabb1a2
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
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment