Posted By

yeahsure on 09/06/13


Tagged


Versions (?)

My Account


 / Published in: PHP
 

Account Page

  1. if(is_user_logged_in()) {
  2. $user_ID = get_current_user_id();
  3. echo '<h2 class=\'left\'>My Account: ' . $current_user->user_firstname . ' ' . $current_user->user_lastname . ' (' . $user_ID . ')</h2> <h3 class=\'left logout\'><a href=\''. wp_logout_url(home_url()) . '\'>Logout</a></h3><hr />';
  4.  
  5. $name = $current_user->user_firstname;
  6. $last = $current_user->user_lastname;
  7. $dob = $current_user->user_dob;
  8. $mail = $current_user->user_login;
  9. $title = $current_user->user_title;
  10. $org = $current_user->user_organization;
  11. $add1 = $current_user->user_address;
  12. $add2 = $current_user->user_address2;
  13. $city = $current_user->user_city;
  14. $state = $current_user->user_state;
  15. $zip = $current_user->user_zip;
  16. $country = $current_user->user_country;
  17. $phone1 = $current_user->user_dayphone;
  18. $phone2 = $current_user->user_eveningphone;
  19. $fax = $current_user->user_fax;
  20.  
  21.  
  22.  
  23. echo '<div class=\'left\'>';
  24. echo '<p><strong>PIN Number:&nbsp;' . $user_ID . '</strong></p>';
  25.  
  26. gravity_form(3, false, false, true, array('user_first_name' => $name, 'user_last_name' => $last, 'user_login' => $mail, 'user_title' => $title, 'user_organization' => $org, 'user_address' => $add1, 'user_address2' => $add2, 'user_city' => $city, 'user_state' => $state, 'user_zip' => $zip, 'user_country' => $country, 'user_day_phone' => $phone1, 'user_evening_phone' => $phone2, 'user_fax' => $fax), false);
  27. echo '<hr /></div>';

Report this snippet  

You need to login to post a comment.