Jump to content
Sign in to follow this  
Chris74

Sub account can modify main account pay methods.

Recommended Posts

Using 7.8.3 currently.

I noticed that if you create a sub account - even if it has no privileges it can use the "Payment methods" option and add / remove the main account payment methods.

Can anyone confirm that this is fixed in a later version? I've checked the changelog and I can't find anything.

Share this post


Link to post
Share on other sites
Posted (edited)
39 minutes ago, Chris74 said:

Can anyone confirm that this is fixed in a later version? I've checked the changelog and I can't find anything.

testing in v7.10.2, a sub-account can still add/remove payment methods... even ones that they haven't added themselves.

with sub-accounts being removed / replaced n v8, I can't see this issue being fixed - but you could probably fix it with a ClientAreaPaymentMethods hook that checks whether the current user is a sub-account, and if so, redirects them away from the pay methods page.

<?php
 
# Redirect Subaccounts from Pay Methods Page Hook
# Written by brian!

function redirect_paymeethods_hook($vars) {
	
	$contactid = $vars['loggedinuser']['contactid'];
	if ($contactid) {
		header("Location: ../clientarea.php");
	}
}
add_hook('ClientAreaPaymentMethods', 1, 'redirect_paymeethods_hook');

arguably, you could add another hook to remove the link from the Navbar... it just depends how thorough you want to be from sub-accounts being aware of the pay methods page - the above hook should prevent sub-accounts from accessing it, but allow clients to do so.

Edited by brian!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated