Commit 10badd30 authored by memtkmcc's avatar memtkmcc

Issue #3150004: Drupal 9 support - Stop using deprecated functions in D8

parent 5fe1fafa
......@@ -4,7 +4,8 @@
* Rebuild all the caches
*/
use Drupal\Core\Url;
use \Drupal\Core\Url;
use \Drupal\user\Entity\User;
$GLOBALS['url'] = d()->uri;
$GLOBALS['profile'] = d()->profile;
......@@ -18,13 +19,12 @@ function install_send_welcome_mail($url, $account, $language, $client_email, $on
if ($client_email) {
// Mail one time login URL and instructions.
$from = \Drupal::config('system.site')->get('mail');
$username = $account->getUsername();
$username = "admin";
$site = \Drupal::config('system.site')->get('name');
$uri_brief = preg_replace('!^https?://!', '', $base_url);
$edit_uri = $base_url . '/user/1/edit';
$mailto = $account->getEmail();
$date = format_date(time());
$date = \Drupal::service('date.formatter')->format(time());
$mail_params['variables'] = array(
'!username' => $username,
......@@ -157,7 +157,7 @@ function install_main() {
->set('path.temporary', "sites/$url/private/temp")
->save();
$account = user_load(1);
$account = \Drupal\user\Entity\User::load(1);
// If a redirect is defined, the symlink to the alias needs to exist before
// we generate the login link, below.
......
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