FYI: I have mashed up SMF Connector and WLPE. By adding and mapping internalKey to SMF’s members table `smf_members` I can have custom control over Forum profiles, too(Namely things like e-mail and Display Name, attributes that aren’t able to be changed natively w/ SMF Connector...) It’s scary how easy you’ve made it. Event functions to run prior to or following the update/edit procedure would allow for dupe checking and extended validation in unique circumstances!
pixelchutes, do you know if it would be possible to apply the SMF<->WLPE briding you’ve done to other forum software (like MyBB)? That would be pretty cool, IMO.
Your message has been sent to "tester"
[!WebLoginPE? ®Type=`verify` &groups=`Registered Users` ¬ify=`[email protected]`!]
Hmmm. Interesting. Could be a SMTP issue on your server. I will look at the code for the sections you pointed out and see if I can figure out why they are behaving differently. Thank you for your review and the bug report. I appreciate the real-world tests.
Thanks for the GREAT Snippet! I have uploaded the latest version 1.2.0.
I am having the following problems with the default install:
1) Any message to a member does not go thru to that member, yet when filling in the Subject and Message and Send button, it claims all went well? :Your message has been sent to "tester"
2) I get the following message when using this Register function:[!WebLoginPE? ®Type=`verify` &groups=`Registered Users` ¬ify=`[email protected]`!]
"Could not instantiate mail function."
However the new user’s registration email does indeed go thru email, but the notify of the webmaster does not?
Both of these problems may be connected the email function? Any ideas?
Thanks again for a great snippet.
@pixelchutes:
I think your event based function idea is golden!
I am 110% a fan of that.
Especially for events like `OnBeforeUpdateProfile` where you could manipulate the fields and send them back to WebLoginPE before they are stored in the DB. It is brilliant. I am not sure who came up with the concept in eForm (Raymond or JJ), but It bares repeating. It is brilliant.

Scratch that. I talked extensively with Jason on this subject tonight and he has me convinced that the best course of action is to invoke existing MODx system events wherever possible and create specific WLPE events as needed. Any custom code/function that you want to run on a particular event can be placed in a plugin bound to said event. I will most likely have an event for On and OnBefore each service that WLPE provides.
I know this might not be "exactly" what you were thinking, but it is the better, more compatible, more MODx option. I think you will find it so much more flexible than what we originally talked about (eForm style). you can have many, many plugins fire on the same event if you like. I will publish the public API for each system event. Non-standard MODx events will start at a number above 1100 and be automatically added if necessary (see the table `system_eventnames`).
<input id="wlpeUserProfilePasswordConfirm" type="password" name="password.confirm" />
<input id="wlpeUserProfilePasswordConfirm" type="password" name="passwordconfirm" />
if (!empty($_POST['password']) && isset($_POST['password']) && isset($_POST['passwordconfirm']))
{
if ($_POST['password'] === $_POST['passwordconfirm'])
{
if (!empty($_POST['password']) && isset($_POST['password']) && isset($_POST['password.confirm']))
{
if ($_POST['password'] === $_POST['password.confirm'])
{
$passwordConfirm = $modx->db->escape($modx->stripTags($_POST['passwordconfirm']));
A bug indeed!
Possible Bug for php4?
I am finding with the default settings I am having trouble with changing a user’s password in the profile page. I changed the template variable for the confirm.password to confirmpassword and it does indeed work now.
Original coding in the webloginpe.templates.php file:
<input id="wlpeUserProfilePasswordConfirm" type="password" name="password.confirm" />
Changed coding:
<input id="wlpeUserProfilePasswordConfirm" type="password" name="passwordconfirm" />
It now matches the coding in the webloginpe.class.php file:
if (!empty($_POST['password']) && isset($_POST['password']) && isset($_POST['passwordconfirm'])) { if ($_POST['password'] === $_POST['passwordconfirm']) {
I tried first off to change the coding in the class file to match the original template coding as such:
if (!empty($_POST['password']) && isset($_POST['password']) && isset($_POST['password.confirm'])) { if ($_POST['password'] === $_POST['password.confirm']) {
However this still would not change the password. I am not sure if php4 is actually reading the value of the password.confirm box, but it is reading the value of the passwordconfirm box?
LOL. that is legacy code from before I added custom table support where the only fields available were those in the "web_user_attributes" table. I have completely redesigned the Register and SaveUserProfile methods to be more efficient and to not overwrite unposted data in a form where a form field for each column is not provided.
One other note, the following coding in the class file in the Register function:
$passwordConfirm = $modx->db->escape($modx->stripTags($_POST['passwordconfirm']));
does not seem to be used anywhere in the class scripting?
It will be fixed in the next version. Thanks.
Anyways, this seems simply to be the difference in using confirm.password and confirmpassword.