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()
128
128
// make sure the hash matches
129
129
// make sure the UID is passed
130
130
if ((isset ($ cookie_hash ) && !empty ($ cookie_hash )) && (isset ($ uid ) && !empty ($ uid ))) {
131
+ $ drupalHelper = new DrupalHelper ();
132
+ $ drupalHelper ->bootDrupal ($ this ->config ->getDrupalroot ());
133
+
131
134
// Make sure no one manipulated the hash or the uid in the cookie before we trust the uid
132
135
$ hash = Crypt::hmacBase64 (
133
- $ account -> id () ,
136
+ $ uid ,
134
137
$ this ->config ->getCookieSalt () . \Drupal::service ('private_key ' )->get ()
135
138
);
136
139
if (!Crypt::hashEquals ($ hash , $ cookie_hash )) {
@@ -149,9 +152,6 @@ private function getUser()
149
152
}
150
153
151
154
if (!empty ($ drupaluid )) {
152
- $ drupalHelper = new DrupalHelper ();
153
- $ drupalHelper ->bootDrupal ($ this ->config ->getDrupalroot ());
154
-
155
155
// Load the user object from Drupal.
156
156
$ drupaluser = User::load ($ uid );
157
157
if ($ drupaluser ->isBlocked ()) {
You can’t perform that action at this time.
0 commit comments