I noticed this on http://www.diatribune.com/mysite.

If the default content set includes the Profile element, when the user creates their MySite page, that element is set with type_id of zero (0). The "Add My Profile" link only checks against the type_id of the user's UID, so I see the Add Profile link even though my profile is already on my page.

Double-check the logic for that link.

Comments

agentrickard’s picture

Status: Active » Fixed

We base the profile data from the MySite UID, not the stores type_id, so this query changes:

    $_mysite_profile_admin = db_result(db_query("SELECT COUNT(mid) FROM {mysite_data} WHERE type = 'profile' AND uid = %d", arg(1)));

To:

    $_mysite_profile_admin = db_result(db_query("SELECT COUNT(mid) FROM {mysite_data} WHERE type = 'profile' AND type_id = %d", arg(1)));

Committed to HEAD.

agentrickard’s picture

I have the two lines reversed above. UID = %d is correct.

Anonymous’s picture

Status: Fixed » Closed (fixed)