CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Remove "Edit" link under CiviCRM profile in Drupal "My Account"
Pages: [1]

Author Topic: Remove "Edit" link under CiviCRM profile in Drupal "My Account"  (Read 2640 times)

adastra

  • Guest
Remove "Edit" link under CiviCRM profile in Drupal "My Account"
March 26, 2009, 11:40:41 am
I created 2 custom CiviCRM profiles and checked 'View/Edit User Account' so that they both appear in Drupal's "My Account" page. On that page, under the profiles, there is a link:

» Edit '[name of profile]'

<strong>How do I remove that link?</strong> Which CiviCRM file produces that link?

When I'm viewing my own profile, it works great. When I view someone else's profile, that links is still there. I get an "Access Denied" message when I click on it, so user permissions are indeed respected. But I'd like to remove that link.

Thank you kindly,

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Remove "Edit" link under CiviCRM profile in Drupal "My Account"
March 26, 2009, 12:28:22 pm

drupal/civicrm.module, line 627

lobo

p.s> one of the very few places where we have html in PHP code
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ccowens

  • Guest
Re: Remove "Edit" link under CiviCRM profile in Drupal "My Account"
April 28, 2010, 08:16:39 am
Quote from: Donald Lobo on March 26, 2009, 12:28:22 pm

drupal/civicrm.module, line 627

lobo

p.s> one of the very few places where we have html in PHP code

I don't see any clean way to override this using any hook.  I could do something in hook_user, but no guarantee it'll be run after civicrm_user, and besides, in hook_user I won't know the exact string I'm looking to pull back out of $user->content.


Am I missing something?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Remove "Edit" link under CiviCRM profile in Drupal "My Account"
April 28, 2010, 05:23:16 pm

yeah, unfortunately i think that will require a code hack :( or set the weight of your module to be higher than civicrm's and do a preg replace

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Remove "Edit" link under CiviCRM profile in Drupal "My Account"

This forum was archived on 2017-11-26.