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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How can a user update their own profile?
Pages: 1 2 [3]

Author Topic: How can a user update their own profile?  (Read 21551 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How can a user update their own profile?
September 09, 2008, 02:16:24 am
Hi all,

Let me jump in to say that something similar would be useful for the registrations to event as well

(eg a meeting where I know I only invite people that are on civi, but end up with duplicates because the participant didn't put the same email than the one we have...)

Ideally, on the registration, being able to pass both the contact id and some kind of "key" (as for the profile modifications), got the form prefilled, and add a link at the top "welcome Xavier, not Xavier, please log out if your want to register someone else"

We start having the same need for both the profile/donation and event registration at least, looks like something to be put in a common class ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: How can a user update their own profile?
September 09, 2008, 07:41:43 am
Quote from: xavier on September 09, 2008, 02:16:24 am
We start having the same need for both the profile/donation and event registration at least, looks like something to be put in a common class ?

isn't the common class being: "get the user to create an account" and make these operations a logged in operation? There is always a tradeoff between security and ease of use etc. But in this case when the user is interacting with the system multiple times, an account might be simpler going forward

In the past for various client projects, we've written a "drupal dashboard" module that directs them to various places based on what they have done / need to do.  I think this is quite org specific and generalization is a wee bit harder

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

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How can a user update their own profile?
September 09, 2008, 12:30:30 pm
Hi,

With phplist, I've tried both the login/pwd option and the direct link with the unique id. unique id is the one that works.

I love having yet another account login/pwd like the other guy, and I'm sure my mom is going to embrace openid any day (not that it would solve the problem as the drupal account isn't yet created), but... ;)

The problem is that if I offer the choice between register as a brand new contact (that's very common that you can send someone to replace you, even if you've been invited) or remember your password and register at yourself, I will have random john doe that 1) register as a brand new J. doe (duplicate) AND try to modify his participation (and that time will remember his previous password and won't find his participation).

I'll think about it, and have a look at the ACL system see how/if it could be something that is a potential target to add a login by id+secret key kind of stuff...

Thanks for the input

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: How can a user update their own profile?
September 10, 2008, 04:19:08 am
Pete, I asked your question in another thread: http://forum.civicrm.org/index.php/topic,4732.0.html

Now that we can send people to a profile with a checksum to log them in, our next question is how to do the same with contribute pages.
@xurizaemon ● www.fuzion.co.nz

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: How can a user update their own profile?
September 15, 2008, 11:35:43 pm
Quote from: Donald Lobo on September 09, 2008, 07:41:43 am
In the past for various client projects, we've written a "drupal dashboard" module that directs them to various places based on what they have done / need to do. 

Lobo - want to share more about this Drupal dashboard - does it allow people to move across a series of Profiles without having to reenter their details, or log in?
« Last Edit: September 16, 2008, 12:57:26 am by peterd »
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: How can a user update their own profile?
September 16, 2008, 06:29:50 am
Quote from: peterd on September 15, 2008, 11:35:43 pm
Lobo - want to share more about this Drupal dashboard - does it allow people to move across a series of Profiles without having to reenter their details, or log in?

No. The dashboard was displayed after they logged in and then directed them to various links based on their current status etc

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

pvandrunen

  • Guest
Re: How can a user update their own profile?
September 17, 2008, 02:02:45 pm
Can I utilize this to automate sending of "update your information" request forms to multiple households.  Can this link provide access to edit all members of a household as well?

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: How can a user update their own profile?
September 17, 2008, 02:14:49 pm

No. You'll need to write a module to help u do that

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

pvandrunen

  • Guest
Re: How can a user update their own profile?
September 17, 2008, 03:25:06 pm
Would you please clarify which patches I need to apply to give me the functionality described in this thread? Do I need to update "token" and the "mailing" files?  Version: 2.0.6 Drupal PHP5

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: How can a user update their own profile?
September 17, 2008, 05:44:30 pm

check: http://forum.civicrm.org/index.php/topic,3905.15.html

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

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: How can a user update their own profile?
September 25, 2008, 03:56:11 am
Quote from: xurizaemon on September 10, 2008, 04:19:08 am
Now that we can send people to a profile with a checksum to log them in, our next question is how to do the same with contribute pages.

>>> http://forum.civicrm.org/index.php/topic,4723.0.html please test this code to do that.

Xavier, it should be possible to generalise this so it works for event rego as well.
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: How can a user update their own profile?
September 28, 2008, 06:15:18 am
Quote from: dharmatech on August 04, 2008, 04:23:09 pm
... and here's the patch for a clean 2.0.5 installation.

Thanks for the patch Dharmatech, this got us up and running with checksums. Very pleased.

However, with the patch as it applied for us, we had an issue where any checksum would not be evaluated unless URL tracking was enabled.

Depending on URL tracking for checksums meant that an attacker could guess any checksum we mailed by iterating through the URL tracking IDs. This seems to be a security issue, both because contact's private data can be exposed, and because our contact data could be corrupted by a malicious contact.

This was happening because when URL tracking is disabled, the token type for an embedded URL is blank, and the token value is href="blah?blah{contact.checksum}"

I added a final condition to the clause to capture this, and copied code in from CRM_Utils_Token::getContactTokenReplacement() to handle this case. However you might be able to come up with cleaner code than mine.

Here's our copy of CRM/Mailing/BAO/Mailing.php. The additional code starts at line 1054.

Code: [Select]
@@ -1053,7 +1051,12 @@
           $data = CRM_Utils_Token::getContactTokenReplacement($token, $contact);
         } else if ( $type == 'action' ) {
           $data = CRM_Utils_Token::getActionTokenReplacement($token, $verp, $urls, $html);
-        }
+        } else if ( empty( $type ) ) {
+          $from  = '{contact.checksum}' ;
+          $cs    = CRM_Contact_BAO_Contact::generateChecksum( $contact['contact_id'] );
+          $value = "id={$contact['contact_id']}&cs={$cs}";
+          $data = str_replace( $from, $value, $data ) ;
+        }
         return $data;
     }

Dharmatech, can you please confirm if your 2.0.5 code works as posted without URL tracking enabled? If that's the case, we may have some other code changes interfering with the patch you supplied (and I apologise for raising this issue).

Cheers
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: How can a user update their own profile?
September 29, 2008, 04:15:11 pm
Quote from: peterd on September 03, 2008, 02:00:02 pm
Originally posted here http://forum.civicrm.org/index.php/topic,4620.msg20154.html#msg20154

Firstly, with Track Click Throughs on we end up with the same problem as here, namely that the URL provided for the profile gets preceded with that sort of address so we get
http://(our.web.site.address)/sites/all/modules/civicrm/extern/href=%22http://(our.web.site.address)/civicrm/profile/edit?reset=1&gid=1&cs=82040e6e5e0ed56201080d2e6e66a9da_1220440559_168

This appears also in 2.1, issue opened: http://issues.civicrm.org/jira/browse/CRM-3639
@xurizaemon ● www.fuzion.co.nz

brigittem

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
Re: How can a user update their own profile?
October 08, 2010, 03:27:52 pm
Quote from: Donald Lobo on July 08, 2008, 01:40:20 pm

the token is: contact.checksum and has a life of 7 days since it was generated

Its not documented very well, and hence u've not heard of it :)

lobo

Hi,

could you tell me where I could increase the life of contact.checksum (30 days ?).

Best regards

Brigitte

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: How can a user update their own profile?
October 09, 2010, 08:04:34 am

CRM/Contact/BAO/Contact/Utils.php, function generateChecksum

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 2 [3]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • How can a user update their own profile?

This forum was archived on 2017-11-26.