Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Implementation of hook_perm().
- */
- function shared_account_perm() {
- return array('edit own user account');
- }
- /**
- * Implementation of hook_menu_alter().
- */
- function shared_account_menu_alter(&$callbacks) {
- $callbacks['user/%user_category/edit']['access callback'] = 'shared_account_edit_access';
- }
- /**
- * Access callback for user account editing.
- */
- function shared_account_edit_access($account) {
- return ((($GLOBALS['user']->uid == $account->uid) && user_access('edit own user account', $account)) || user_access('administer users')) && $account->uid > 0;
- }
Add Comment
Please, Sign In to add comment