File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,12 @@ private function getUser()
128128 // make sure the hash matches
129129 // make sure the UID is passed
130130 if ((isset ($ cookie_hash ) && !empty ($ cookie_hash )) && (isset ($ uid ) && !empty ($ uid ))) {
131+ $ drupalHelper = new DrupalHelper ();
132+ $ drupalHelper ->bootDrupal ($ this ->config ->getDrupalroot ());
133+
131134 // Make sure no one manipulated the hash or the uid in the cookie before we trust the uid
132135 $ hash = Crypt::hmacBase64 (
133- $ account -> id () ,
136+ $ uid ,
134137 $ this ->config ->getCookieSalt () . \Drupal::service ('private_key ' )->get ()
135138 );
136139 if (!Crypt::hashEquals ($ hash , $ cookie_hash )) {
@@ -149,9 +152,6 @@ private function getUser()
149152 }
150153
151154 if (!empty ($ drupaluid )) {
152- $ drupalHelper = new DrupalHelper ();
153- $ drupalHelper ->bootDrupal ($ this ->config ->getDrupalroot ());
154-
155155 // Load the user object from Drupal.
156156 $ drupaluser = User::load ($ uid );
157157 if ($ drupaluser ->isBlocked ()) {
You can’t perform that action at this time.
0 commit comments