Skip to content

Commit

Permalink
Merge pull request #2721 from QuizandSurveyMaster/CU-86cx30hzp-qsm-co…
Browse files Browse the repository at this point in the history
…nflict-with-user-role-plugin

Fixed coflict with User Role Plugin
  • Loading branch information
zubairraeen authored Nov 26, 2024
2 parents 81e765e + 794bfc9 commit 9245e19
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions mlw_quizmaster2.php
Original file line number Diff line number Diff line change
Expand Up @@ -771,12 +771,6 @@ public function qsm_add_user_capabilities() {
if ( ! $role ) {
return;
}
// Remove all capabilities first.
foreach ( $administrator_capabilities as $cap ) {
if ( $role->has_cap( $cap ) ) {
$role->remove_cap( $cap );
}
}

// Dynamically determine the capabilities to add based on the current user role.
$capabilities_to_add = isset(${$rolename . '_capabilities'}) ? ${$rolename . '_capabilities'} : array();
Expand Down

0 comments on commit 9245e19

Please sign in to comment.