Hi StandUpShout,
Once you have made a login access to your client, write in [edit-profile]. This should be the shortcode you want to use.
Regards,
What shortcode do I use to allow someone to change their password? That is the functionality I was trying to provide the user.
Hi StandUpShout,
There is no such functionality with our shortcodes. The user can strictly change his profile fields. However, we understand the inconvenience that it can be caused. We will take it into consideration.
Regards,
Could you explain what the [account-details] shortcode listed on your FAQ is intended for?
The [account-details] shortcode is for your users to access their account information once logged in. For instance, if they would like to change their password.
Right. This is what I’ve been talking about, but I mistakenly wrote [edit-account] rather than [account-details].
The [account-details] shortcode does not seem to work because the code in Insert_Edit_Account.php, which is the the file that sets the [account-details] shortcode to call the Insert_Edit_Account_Form() function, is missing code. The html is incomplete and does not include a submit button to save the changes, or closing tags for the <form> and some <div>’s.
The entirety of the Insert_Edit_Account.php file is included below, taken from a just-before-I-typed-this download of version 2.2.5 of your plugin. Notice the missing pieces at the end. If that isn’t the problem, then I am flummoxed about what is going on here when I try to use the [account-details] shortcode, since nothing is displayed.
<?php
function Insert_Edit_Account_Form($atts) {
global $wpdb, $user_message, $feup_success;
global $ewd_feup_user_table_name;
$Custom_CSS = get_option("EWD_FEUP_Custom_CSS");
$Username_Is_Email = get_option("EWD_FEUP_Username_Is_Email");
$CheckCookie = CheckLoginCookie();
//$Sql = "SELECT * FROM $ewd_feup_fields_table_name ";
//$Fields = $wpdb->get_results($Sql);
$User = $wpdb->get_row($wpdb->prepare("SELECT * FROM $ewd_feup_user_table_name WHERE Username='%s'", $CheckCookie['Username']));
$ReturnString = "";
// Get the attributes passed by the shortcode, and store them in new variables for processing
extract( shortcode_atts( array(
'redirect_page' => '#',
'login_page' => '',
'submit_text' => __('Update Account', 'EWD_FEUP')),
$atts
)
);
$ReturnString .= "<style type='text/css'>";
$ReturnString .= $Custom_CSS;
$ReturnString .= "</style>";
if ($CheckCookie['Username'] == "") {
$ReturnString .= __('You must be logged in to access this page.', 'EWD_FEUP');
if ($login_page != "") {$ReturnString .= "<br />" . __('Please', 'EWD_FEUP') . " <a href='" . $login_page . "'>" . __('login', 'EWD_FEUP') . "</a> " . __('to continue.', 'EWD_FEUP');}
return $ReturnString;
}
if ($feup_success and $redirect_page != '#') {FEUPRedirect($redirect_page);}
$ReturnString .= "<div id='ewd-feup-edit-profile-form-div'>";
if (isset($user_message['Message'])) {$ReturnString .= $user_message['Message'];}
$ReturnString .= "<form action='#' method='post' id='ewd-feup-edit-profile-form'>";
$ReturnString .= "<input type='hidden' name='ewd-feup-check' value='" . sha1(md5($Time.$Salt)) . "'>";
$ReturnString .= "<input type='hidden' name='ewd-feup-time' value='" . $Time . "'>";
$ReturnString .= "<input type='hidden' name='ewd-feup-action' value='edit-profile'>";
if($Username_Is_Email == "Yes") {
$ReturnString .= "<div id='ewd-feup-register-username-div' class='ewd-feup-field-label'>" . __('Email', 'EWD_FEUP') . ": </div>";
$ReturnString .= "<input type='email' class='ewd-feup-text-input' name='Username' value='" . $User->Username . "'>";
} else {
$ReturnString .= "<div id='ewd-feup-register-username-div' class='ewd-feup-field-label'>" . __('Username', 'EWD_FEUP') . ": </div>";
$ReturnString .= "<input type='text' class='ewd-feup-text-input' name='Username' value='" . $User->Username . "'>";
}
$ReturnString .= "<div id='ewd-feup-register-password-div' class='ewd-feup-field-label'>" . __('Password', 'EWD_FEUP') . ": </div>";
$ReturnString .= "<input type='password' class='ewd-feup-text-input' name='User_Password' value=''>";
$ReturnString .= "<div id='ewd-feup-register-password-confirm-div' class='ewd-feup-field-label'>" . __('Repeat Password', 'EWD_FEUP') . ": </div>";
$ReturnString .= "<input type='password' class='ewd-feup-text-input' name='Confirm_User_Password' value=''>";
}
add_shortcode("account-details", "Insert_Edit_Account_Form");
?>
Hi StandUp,
Thanks for pointing us in the right direction; no idea how the lines at the bottom of that file ended up not being there. We’re releasing an update this week, and the file should be back in working order then.