Fix on registrar transfer option

This commit is contained in:
Pinga 2025-02-04 10:36:06 +02:00
parent 29db0ae8b6
commit 9504733dbf

View file

@ -1313,6 +1313,9 @@ class RegistrarsController extends Controller
return $response->withHeader('Location', '/registrars')->withStatus(302); return $response->withHeader('Location', '/registrars')->withStatus(302);
} }
$user_id = $db->selectValue('SELECT user_id FROM registrar_users WHERE registrar_id = ?',
[ $registrar['id'] ]);
$db->beginTransaction(); $db->beginTransaction();
try { try {
@ -1356,12 +1359,17 @@ class RegistrarsController extends Controller
] ]
); );
$db->delete( if (!empty($user_id)) {
'registrar_users', $db->update(
'users',
[ [
'registrar_id' => $registrar['id'] 'status' => 1
],
[
'id' => $user_id
] ]
); );
}
$db->update( $db->update(
'registrar', 'registrar',