Skip to content

Commit

Permalink
bug 3012 fixed: invalidate_user_cache() on pwg.users.setInfo, pwg.gro…
Browse files Browse the repository at this point in the history
…ups.addUser, pwg.groups.deleteUser

git-svn-id: http://piwigo.org/svn/trunk@25968 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Dec 16, 2013
1 parent b3bf2ef commit 5c9b9c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions include/ws_functions/pwg.groups.php
Expand Up @@ -246,6 +246,8 @@ function ws_groups_addUser($params, &$service)
array('ignore'=>true)
);

invalidate_user_cache();

return $service->invoke('pwg.groups.getList', array('group_id' => $params['group_id']));
}

Expand Down Expand Up @@ -278,6 +280,8 @@ function ws_groups_deleteUser($params, &$service)
;';
pwg_query($query);

invalidate_user_cache();

return $service->invoke('pwg.groups.getList', array('group_id' => $params['group_id']));
}

Expand Down
8 changes: 5 additions & 3 deletions include/ws_functions/pwg.users.php
Expand Up @@ -335,9 +335,9 @@ function ws_users_delete($params, &$service)
}

return l10n_dec(
'%d user deleted', '%d users deleted',
count($params['user_id'])
);
'%d user deleted', '%d users deleted',
count($params['user_id'])
);
}

/**
Expand Down Expand Up @@ -560,6 +560,8 @@ function ws_users_setInfo($params, &$service)
}
}

invalidate_user_cache();

return $service->invoke('pwg.users.getList', array(
'user_id' => $params['user_id'],
'display' => 'basics,'.implode(',', array_keys($updates_infos)),
Expand Down

0 comments on commit 5c9b9c4

Please sign in to comment.