User Profile Links Display Patch
hutch - February 28, 2009 - 14:47
| Project: | Ubercart Marketplace |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Here is a small patch that cleans up the user profile insertion so that it does not display if there are no links to display, also puts the breaks at the end of each link for tidier output.
This is on D6 dev version
| Attachment | Size |
|---|---|
| user_profile_links.patch | 1.61 KB |

#1
Thanks. This looks good, so I see no reason not to commit it to the next release (when I get a chance to update) d6.
#2
#3
Here is an improvement on the previous patch, please have a look Turgrid and see if it fits with your logic.
It allows admin to see other user profiles without admin's ability to see everything getting in the way and attempts to ensure that users only get to see their own. Where $user and $account do not match $user is used.
What I am trying to set up is a market where all the products are being sold by all the sellers (salesmen in a more conventional sense)
Therefore I am enabling mp_products but not enabling 'view own products' for these salesmen. Many of the orders are going to be imported from other sources so I'm trying to figure out how best to do this. I'm not clear how an order is tagged as 'belonging' to a seller. uc_orders.uid is for the customer, node.uid (for a product) will be the uid of the Content Manager but how to store the seller uid?
The aim is also to allow a Sales Manager to see all the orders with the sellers uid (name) visible.
#4
Ooops, replying to my own posting, I have found a bug in user_profile_links2.patch.
For anyone who has already applied it, edit line 40 and change
$user->uid <> 1to
$user->uid > 1re-rolled patch is attached
#5
Can we have a patch like this for 5x please?
#6
untested, please report back so others will know
#7
Thank you for the patch. I tried it but now whenever I visit a user's profile I see my own profile instead even though the url shows the link to the other user
#8
A version of this was patched to 6.x but I will assume it's still active for 5.x