Fixed manual email verification

This commit is contained in:
Julian Prieber 2024-01-04 18:14:59 +01:00
parent c72dbc790f
commit dc76060b56
3 changed files with 8 additions and 3 deletions

View File

@ -138,7 +138,7 @@ public function SendTestMail(Request $request)
$id = $request->id;
$status = $request->verify;
if ($status == '-') {
if ($status == "true") {
$verify = '0000-00-00 00:00:00';
} else {
$verify = NULL;

View File

@ -67,8 +67,13 @@ class UserTable extends DataTableComponent
if ($row->role == 'admin' && $row->email_verified_at != '') {
return '<div class="text-center">-</div>';
} else {
if($row->email_verified_at == ''){
$verifyLinkBool = 'true';
} else {
$verifyLinkBool = 'false';
}
$verifyLink = route('verifyUser', [
'verify' => '-' . $row->email_verified_at,
'verify' => $verifyLinkBool,
'id' => $row->id
]);
if ($row->email_verified_at == '') {

View File

@ -153,7 +153,7 @@ Route::group([
Route::get('/admin/deleteLink/{id}', [AdminController::class, 'deleteLinkUser'])->name('deleteLinkUser');
Route::get('/admin/users/block/{block}/{id}', [AdminController::class, 'blockUser'])->name('blockUser');
Route::get('/admin/users/verify/{verify}/{id}', [AdminController::class, 'verifyCheckUser'])->name('verifyCheckUser');
Route::get('/admin/users/verify/-{verify}/{id}', [AdminController::class, 'verifyUser'])->name('verifyUser');
Route::get('/admin/users/verify-mail/{verify}/{id}', [AdminController::class, 'verifyUser'])->name('verifyUser');
Route::get('/admin/edit-user/{id}', [AdminController::class, 'showUser'])->name('showUser');
Route::post('/admin/edit-user/{id}', [AdminController::class, 'editUser'])->name('editUser');
Route::get('/admin/new-user', [AdminController::class, 'createNewUser'])->name('createNewUser')->middleware('max.users');