Skip to content

Commit

Permalink
Merge pull request #11958 from mlutfy/d8-bootstrap-user
Browse files Browse the repository at this point in the history
Drupal8 loadBootStrap: fix user variable
  • Loading branch information
colemanw authored Apr 9, 2018
2 parents 50947e4 + 3637b50 commit 4c71a8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Utils/System/Drupal8.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public function loadBootStrap($params = array(), $loadUser = TRUE, $throwError =
CRM_Utils_Hook::config($config);

if ($loadUser) {
if (!empty($params['uid']) && $username = \Drupal\user\Entity\User::load($uid)->getUsername()) {
if (!empty($params['uid']) && $username = \Drupal\user\Entity\User::load($params['uid'])->getUsername()) {
$this->loadUser($username);
}
elseif (!empty($params['name']) && !empty($params['pass']) && \Drupal::service('user.auth')->authenticate($params['name'], $params['pass'])) {
Expand Down

0 comments on commit 4c71a8b

Please sign in to comment.