mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-11 01:08:34 +02:00
Fix on registrar transfer option
This commit is contained in:
parent
29db0ae8b6
commit
9504733dbf
1 changed files with 14 additions and 6 deletions
|
@ -1313,6 +1313,9 @@ class RegistrarsController extends Controller
|
|||
return $response->withHeader('Location', '/registrars')->withStatus(302);
|
||||
}
|
||||
|
||||
$user_id = $db->selectValue('SELECT user_id FROM registrar_users WHERE registrar_id = ?',
|
||||
[ $registrar['id'] ]);
|
||||
|
||||
$db->beginTransaction();
|
||||
|
||||
try {
|
||||
|
@ -1356,12 +1359,17 @@ class RegistrarsController extends Controller
|
|||
]
|
||||
);
|
||||
|
||||
$db->delete(
|
||||
'registrar_users',
|
||||
[
|
||||
'registrar_id' => $registrar['id']
|
||||
]
|
||||
);
|
||||
if (!empty($user_id)) {
|
||||
$db->update(
|
||||
'users',
|
||||
[
|
||||
'status' => 1
|
||||
],
|
||||
[
|
||||
'id' => $user_id
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$db->update(
|
||||
'registrar',
|
||||
|
|
Loading…
Add table
Reference in a new issue