Skip to content

Commit

Permalink
Added mu-save-user hook
Browse files Browse the repository at this point in the history
Required for playing nice with other plugins which want to save data to the user file
  • Loading branch information
webketje committed Mar 31, 2015
1 parent 7d943c1 commit 04eaedc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions user-managment.php
Expand Up @@ -211,7 +211,7 @@ public function getUserPermission($user, $permission=null)

public function mmProcessEditUser()
{
global $xml, $perm;
global $xml, $perm, $datau, $USR;
$NUSR = $_POST['usernamec'];
$usrfile = $_POST['usernamec'] . '.xml';
$NLANDING = (!isset($_POST['Landing']) || isset($_POST['Landing']) && $_POST['Landing'] == 'pages.php') ? '' : $_POST['Landing'];
Expand All @@ -230,7 +230,8 @@ public function mmProcessEditUser()
$support = (isset($_POST['Support'])) ? $_POST['Support'] : '';
$edit = (isset($_POST['Edit'])) ? $_POST['Edit'] : '';
$admin = (isset($_POST['Admin'])) ? $_POST['Admin'] : '';


$datau = getXML(GSUSERSPATH . $USR . '.xml');
if (isset($_POST['usernamec']))
{
// Edit user xml file - This coding was mostly taken from the 'settings.php' page..
Expand All @@ -255,6 +256,7 @@ public function mmProcessEditUser()
$perm->addChild('EDIT', $edit);
$perm->addChild('LANDING', $NLANDING);
$perm->addChild('ADMIN', $admin);
exec_action('mu-save-user');
save_custom_permissions();
if (!XMLsave($xml, GSUSERSPATH . $usrfile))
{
Expand Down

0 comments on commit 04eaedc

Please sign in to comment.