Fix User Password Check now that we have attribute tags

This commit is contained in:
Deon George 2025-04-06 22:12:16 +10:00
parent 8f39603f9f
commit ffa8cdc826
2 changed files with 4 additions and 4 deletions

View File

@ -236,7 +236,7 @@ class HomeController extends Controller
$password = $o->getObject('userpassword');
$result = collect();
foreach ($password as $key => $value) {
foreach ($password->values->dot() as $key => $value) {
$hash = $password->hash($value);
$compare = Arr::get($request->password,$key);
//Log::debug(sprintf('comparing [%s] with [%s] type [%s]',$value,$compare,$hash::id()),['object'=>$hash]);

View File

@ -7,12 +7,12 @@
<div class="modal-body">
<table class="table table-bordered p-1">
@foreach(($up=$o->getObject('userpassword'))->values as $key => $value)
@foreach(($up=$o->getObject('userpassword'))->values->dot() as $dotkey => $value)
<tr>
<th>Check</th>
<td>{{ $up->render_item_old($key) }}</td>
<td>{{ $up->render_item_old($dotkey) }}</td>
<td>
<input type="password" style="width: 90%" name="password[{{$key}}]"> <i class="fas fa-fw fa-lock"></i>
<input type="password" style="width: 90%" name="password[{{ $dotkey }}]"> <i class="fas fa-fw fa-lock"></i>
<div class="invalid-feedback pb-2">
@lang('Invalid Password')
</div>