Skip to content

Commit

Permalink
Fixed issue #17454: Unable to remove a user with survey permissions w…
Browse files Browse the repository at this point in the history
…ith friendly url enabled (#2037)

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
  • Loading branch information
gabrieljenik and encuestabizdevgit committed Sep 15, 2021
1 parent b8671cb commit 58bd049
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions application/controllers/admin/surveypermission.php
Expand Up @@ -127,7 +127,6 @@ public function index($iSurveyID)
if (Permission::model()->hasSurveyPermission($iSurveyID, 'surveysecurity', 'delete')) {
$deleteUrl = App()->createUrl("admin/surveypermission/sa/delete/surveyid/" . $iSurveyID, array(
'action' => 'delsurveysecurity',
'user' => $PermissionRow['users_name'],
'uid' => $PermissionRow['uid']
));
$deleteConfirmMessage = gT("Are you sure you want to delete this entry?");
Expand Down Expand Up @@ -530,7 +529,10 @@ function delete($surveyid)
if (Permission::model()->hasSurveyPermission($surveyid, 'surveysecurity', 'delete')) {
if (isset($postuserid)) {
$dbresult = Permission::model()->deleteAll("uid = :uid AND entity_id = :sid AND entity = 'survey'", array(':uid' => $postuserid, ':sid' => $surveyid));
$addsummary .= "<br />" . gT("Username") . ": " . sanitize_xss_string(App()->getRequest()->getParam('user')) . "<br /><br />\n";
$user = User::model()->findByPk($postuserid);
if (!empty($user)) {
$addsummary .= "<br />" . gT("Username") . ": " . sanitize_xss_string($user->users_name) . "<br /><br />\n";
}
$addsummary .= "<div class=\"successheader\">" . gT("Success!") . "</div>\n";
} else {
$addsummary .= "<div class=\"warningheader\">" . gT("Could not delete user. User was not supplied.") . "</div>\n";
Expand Down

0 comments on commit 58bd049

Please sign in to comment.