mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-26 12:28:28 +02:00
Fixed domain delete issue when admin
This commit is contained in:
parent
8d1cd1ae39
commit
ca1654a4eb
1 changed files with 3 additions and 1 deletions
|
@ -1986,12 +1986,14 @@ class DomainsController extends Controller
|
||||||
$parts = extractDomainAndTLD($domainName);
|
$parts = extractDomainAndTLD($domainName);
|
||||||
$label = $parts['domain'];
|
$label = $parts['domain'];
|
||||||
$domain_extension = $parts['tld'];
|
$domain_extension = $parts['tld'];
|
||||||
|
|
||||||
if ($_SESSION["auth_roles"] != 0) {
|
if ($_SESSION["auth_roles"] != 0) {
|
||||||
$clid = $db->selectValue('SELECT registrar_id FROM registrar_users WHERE user_id = ?', [$_SESSION['auth_user_id']]);
|
$clid = $db->selectValue('SELECT registrar_id FROM registrar_users WHERE user_id = ?', [$_SESSION['auth_user_id']]);
|
||||||
if ($registrar_id_domain != $clid) {
|
if ($registrar_id_domain != $clid) {
|
||||||
return $response->withHeader('Location', '/domains')->withStatus(302);
|
return $response->withHeader('Location', '/domains')->withStatus(302);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$clid = $registrar_id_domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $db->select('SELECT id, tld FROM domain_tld');
|
$result = $db->select('SELECT id, tld FROM domain_tld');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue