anonymous_user_unblock_test.module

Dummy module implementing hook_user_load().

File

modules/user/tests/anonymous_user_unblock_test.module

View source
<?php


/**
 * @file
 * Dummy module implementing hook_user_load().
 */

/**
 * Implements hook_user_load().
 */
function anonymous_user_unblock_test_user_load($users) {
    foreach ($users as $user) {
        if ($user->uid == 0) {
            // Try to fool user_save() into unblocking the anonymous user.
            // See https://www.drupal.org/comment/14722637.
            $user->is_new = FALSE;
            $user->original = clone $user;
        }
    }
}

Functions

Title Deprecated Summary
anonymous_user_unblock_test_user_load Implements hook_user_load().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.