You are here

protected function PasswordTest::feedsLoginUser in Feeds 8.3

Logs in an imported user.

Parameters

string $username: The user's username.

string $password: The user's password.

1 call to PasswordTest::feedsLoginUser()
PasswordTest::test in tests/src/Functional/Feeds/Target/PasswordTest.php
Tests if users with passwords can login after import.

File

tests/src/Functional/Feeds/Target/PasswordTest.php, line 149

Class

PasswordTest
@coversDefaultClass \Drupal\feeds\Feeds\Target\Password @group feeds

Namespace

Drupal\Tests\feeds\Functional\Feeds\Target

Code

protected function feedsLoginUser($username, $password) {
  $account = user_load_by_name($username);
  $this
    ->assertNotEmpty($account, 'Imported user account loaded.');
  $account->passRaw = $password;
  $this
    ->drupalLogin($account);
}