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) »
  • Contact Update for Members
Pages: [1]

Author Topic: Contact Update for Members  (Read 408 times)

tcbirthn

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.6.8
  • CMS version: Wordpress
  • MySQL version: 5.5.37-35.1
  • PHP version: 5.4.29
Contact Update for Members
July 19, 2014, 02:46:22 pm
Is there a way for Members to update their Contact information without contacting us or being able to see everybody's information? I was hoping for something Wordpress user controlled. For instance:

1. Wordpress registration is required on Contribution Page
2. Wordpress user account is synced to contact information
3. Wordpress user account would only have access to change contact associated with it.


Is this possible or am I over thinking it?
TIA

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Contact Update for Members
July 22, 2014, 06:24:21 am
I am not a WP expert, but think this is possible.

Quote
1. Wordpress registration is required on Contribution Page
Create a profile for that page which requires user account creation
Quote
2. Wordpress user account is synced to contact information
This happens automatically
Quote
3. Wordpress user account would only have access to change contact associated with it.
Have you had a look at http://wordpress.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/uf/group/update&action=update&id=1&context=group That profile is used on the wp user edit screen

You might want to have a go with the above. Others might be able to chip in if that doesn't work for you.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

tcbirthn

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.6.8
  • CMS version: Wordpress
  • MySQL version: 5.5.37-35.1
  • PHP version: 5.4.29
Re: Contact Update for Members
July 22, 2014, 09:46:17 am
I actually solved most of this last night. :/

I did this:

1. Created a new page template for my Wordpress theme Called LoginRequired.php

Code: [Select]
<?php
/**
 * Template Name: Login
 * The template for Login form
 **/
if(have_posts()) :
get_header();
// If the user is logged in, show them the content
if( is_user_logged_in() ) :
while(have_posts()) :
the_post();
the_content();
endwhile;
// If the user is not logged in, force them to log in

else :
echo "<b> Please login or register for an account before becoming a member. </b><br><br>";
wp_login_form();
echo '<p id="loginnav"><br><br>';
wp_register( '', ' | ' );
echo '<a href="';
bloginfo( 'wpurl' );
echo '/wp-login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a></p>';
endif;
get_footer();
else :
header( 'Location: ' . esc_url( home_url( '/' ) ) . '/404' );
endif;
?>

2. I added a auto login upon Wordpress user registration and redirected to my membership form. This got added to the very bottom of the exisiting functions.php file
Code: [Select]
//custom registration page redirect
function auto_login_new_user( $user_id ) {
        wp_set_current_user($user_id);
        wp_set_auth_cookie($user_id);
            // You can change home_url() to the specific URL,such as
        //wp_redirect( 'http://www.wpcoke.com' );
        wp_redirect( 'http://birthtexas.org/join-a-texas-birth-network/' );
        exit;
    }
    add_action( 'user_register', 'auto_login_new_user' );

I found where to change the access levels in the CiviCRM dashboard to allow our member users to only edit their own profile. I just need to figure out a way to make it right in front of their face on like a dashlet or something.

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Contact Update for Members
July 24, 2014, 09:11:18 am
OK great - and thanks for sharing your solution :)
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Contact Update for Members

This forum was archived on 2017-11-26.