Skip to content

Commit ca2468b

Browse files
authored
[5.x] Make data of password-protected available in the view (#10946)
1 parent fa1a6a9 commit ca2468b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Auth/Protect/Protectors/Password/Controller.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ public function show()
1717
{
1818
if ($this->tokenData = session('statamic:protect:password.tokens.'.request('token'))) {
1919
$site = Site::findByUrl($this->getUrl());
20+
$data = Data::find($this->tokenData['reference']);
2021

2122
app()->setLocale($site->lang());
2223
}
2324

24-
return View::make('statamic::auth.protect.password');
25+
return View::make('statamic::auth.protect.password')->cascadeContent($data ?? null);
2526
}
2627

2728
public function store()

0 commit comments

Comments
 (0)