GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/user/ |
Upload File : |
<?php /** * @file * Install, update and uninstall functions for the user module. */ /** * Implements hook_schema(). */ function user_schema() { $schema['users_data'] = [ 'description' => 'Stores module data as key/value pairs per user.', 'fields' => [ 'uid' => [ 'description' => 'Primary key: {users}.uid for user.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ], 'module' => [ 'description' => 'The name of the module declaring the variable.', 'type' => 'varchar_ascii', 'length' => DRUPAL_EXTENSION_NAME_MAX_LENGTH, 'not null' => TRUE, 'default' => '', ], 'name' => [ 'description' => 'The identifier of the data.', 'type' => 'varchar_ascii', 'length' => 128, 'not null' => TRUE, 'default' => '', ], 'value' => [ 'description' => 'The value.', 'type' => 'blob', 'not null' => FALSE, 'size' => 'big', ], 'serialized' => [ 'description' => 'Whether value is serialized.', 'type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'default' => 0, ], ], 'primary key' => ['uid', 'module', 'name'], 'indexes' => [ 'module' => ['module'], 'name' => ['name'], ], 'foreign keys' => [ 'uid' => ['users' => 'uid'], ], ]; return $schema; } /** * Implements hook_install(). */ function user_install() { $storage = \Drupal::entityManager()->getStorage('user'); // Insert a row for the anonymous user. $storage ->create([ 'uid' => 0, 'status' => 0, 'name' => '', ]) ->save(); // We need some placeholders here as name and mail are unique. // This will be changed by the settings form in the installer. $storage ->create([ 'uid' => 1, 'name' => 'placeholder-for-uid-1', 'mail' => 'placeholder-for-uid-1', 'status' => TRUE, ]) ->save(); } /** * Fix invalid token in the status_blocked email body. */ function user_update_8100() { $config_factory = \Drupal::configFactory(); $config = $config_factory->getEditable('user.mail'); $mail = $config->get('status_blocked'); if (strpos($mail['body'], '[site:account-name]') !== FALSE) { $mail['body'] = str_replace('[site:account-name]', '[site:name]', $mail['body']); $config->set('status_blocked', $mail)->save(TRUE); } }