Guest User

Untitled

a guest
Jan 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. //how to get the profile2 'pid' of the current user for $profile in the following function
  2. function profile2_access_control_get_pac_acl_id($profile, $op) {
  3.  
  4. $pac_acl_id = pac_acl_get_id_by_name('profile2_access_control', $op . '_' . $profile->pid);
  5. if (!$pac_acl_id) {
  6. $pac_acl_id = pac_acl_create_new_pac_acl('profile2_access_control', $op . '_' . $profile->pid);
  7. }
  8. return $pac_acl_id;
  9. }
Add Comment
Please, Sign In to add comment