@@ -12,7 +12,6 @@ class UnitySQL
1212 private const string TABLE_AUDIT_LOG = "audit_log " ;
1313 private const string TABLE_ACCOUNT_DELETION_REQUESTS = "account_deletion_requests " ;
1414 // FIXME this string should be changed to something more intuitive, requires production change
15- public const string REQUEST_BECOME_PI = "admin " ;
1615
1716 private $ conn ;
1817
@@ -34,7 +33,7 @@ public function getConn(): PDO
3433 //
3534 // requests table methods
3635 //
37- public function addRequest (string $ requestor , string $ dest = self :: REQUEST_BECOME_PI ): void
36+ public function addRequest (string $ requestor , string $ dest ): void
3837 {
3938 if ($ this ->requestExists ($ requestor , $ dest )) {
4039 return ;
@@ -48,7 +47,7 @@ public function addRequest(string $requestor, string $dest = self::REQUEST_BECOM
4847 $ stmt ->execute ();
4948 }
5049
51- public function removeRequest ($ requestor , string $ dest = self :: REQUEST_BECOME_PI ): void
50+ public function removeRequest ($ requestor , string $ dest ): void
5251 {
5352 if (!$ this ->requestExists ($ requestor , $ dest )) {
5453 return ;
@@ -63,7 +62,7 @@ public function removeRequest($requestor, string $dest = self::REQUEST_BECOME_PI
6362 $ stmt ->execute ();
6463 }
6564
66- public function removeRequests (string $ dest = self :: REQUEST_BECOME_PI ): void
65+ public function removeRequests (string $ dest ): void
6766 {
6867 $ stmt = $ this ->conn ->prepare (
6968 "DELETE FROM " . self ::TABLE_REQS . " WHERE request_for=:request_for " ,
@@ -91,7 +90,7 @@ public function getRequest(string $user, string $dest): array
9190 return $ result [0 ];
9291 }
9392
94- public function requestExists (string $ requestor , string $ dest = self :: REQUEST_BECOME_PI ): bool
93+ public function requestExists (string $ requestor , string $ dest ): bool
9594 {
9695 try {
9796 $ this ->getRequest ($ requestor , $ dest );
@@ -109,7 +108,7 @@ public function getAllRequests(): array
109108 return $ stmt ->fetchAll ();
110109 }
111110
112- public function getRequests (string $ dest = self :: REQUEST_BECOME_PI ): array
111+ public function getRequests (string $ dest ): array
113112 {
114113 $ stmt = $ this ->conn ->prepare (
115114 "SELECT * FROM " . self ::TABLE_REQS . " WHERE request_for=:request_for " ,
0 commit comments