| Author |
Message |
Gloub
Joined: Jun 07, 2004
Posts: 9
Status: Offline
|
  Posted:
Jun 14, 2004 - 01:42 PM |
|
Hi all,
Is it possible to let users choose their password when registering and validate their email address by an email sent with a validation link?
I believe this feature exists with PHP Nuke.
Thanks |
|
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Jun 14, 2004 - 02:13 PM |
|
That (also) will be in pn8 (I think)... it wasn't until now.
 |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
Duster
Joined: Jun 04, 2004
Posts: 4
Status: Offline
|
  Posted:
Jun 14, 2004 - 07:43 PM |
|
There are a couple of details associated with this type of system that you should be aware of. My old perl forum program had this feature and I used it on one forum so I picked up some things from practical experience.
Because some e-mail programs strip the long activation URLs that result from this type of system, an alternate method of activation requiring login with a user name and activation code is necessary.
Furthermore, the activation URL should come first in order to mimimize confusion. |
|
|
|
 |
Nutter
Joined: Jun 28, 2004
Posts: 1
Status: Offline
|
Posted:
Jun 28, 2004 - 03:29 PM |
|
Is there a way of editing the text conain in the emails sent out by this hack?
TIA |
|
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Jun 28, 2004 - 10:51 PM |
|
You may change part of the text in the NS-NewUser/lang/YOURLAN/global.php
or in NS-NewUser/user.php, find the lines with pnMail and before this line, you'll find the part where the message is composed.
 |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
Grendel
Joined: Mar 12, 2004
Posts: 19
Location: 2
Status: Offline
|
  Posted:
Jul 05, 2004 - 10:56 PM |
|
Taken from the hack Newuser/user.php, I believe this is the part which sends out the moderation message to the user
| Code: |
{
$newuseremail = $storefield['_UREALEMAIL']['VALUE'];
if (pnConfigGetVar('pnc_mail_modusrwning')=="1") {
$message = ""._UAMAILMODREG1." ".$sitename." "._UAMAILMODREG2."\n\n"._YOUUSEDEMAIL." ($newuseremail) "._TOREGISTER." ".$sitename.". "._FOLLOWINGMEM."\n\n"._UNICKNAME." $uname\n"._UPASSWORD." : $makepass\n"._UACYA."";
$subject = ""._UAMAILMODREGSBJ1." $uname";
$from = "$adminmail";
pnMail($newuseremail, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
}
if (pnConfigGetVar('pnc_mail_adminwning')=="1") {
$message = ""._UAMAILADMINMODREG1." ".$sitename."\n\n"._UAMAILADMINMODREG2." $uname\n"._UAMAILADMINMODREG3." $newuseremail\n\n"._UACYA."";
$subject = ""._UAMAILADMINMODSBJ." $uname";
$from="$adminmail";
pnMail($adminmail, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
}
OpenTable();
echo "<center><font class=pn-title>"._UAMODREQSAVED."</font></center>";
CloseTable();
} |
and this one sends out a mail to the user as soon as the admin approves you
| Code: |
pnMail($email, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
OpenTable();
echo "<font class=\"pn-normal\">"._YOUAREREGISTERED."</font>\n";
if ($allowuserpass=="1") {
echo "<br><br>\n"
."<a class=\"pn-normal\" href=\"user.php?module=NS-User&op=login&uname=$uname&pass=$makepass&url=user.php\">"._LOGIN."</a>\n";
}
CloseTable();
}
if (pnConfigGetVar('pnc_mail_adminwning')=="1") {
$message = ""._UAMAILADMINNUSRREG1." ".$sitename."\n\n"._UAMAILADMINNUSRREG2." $uname\n"._UAMAILADMINNUSRREG3." $email\n\n"._UACYA."";
$subject = ""._UAMAILADMINNUSRREG0." $sitename";
$from="$adminmail";
pnMail($adminmail, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion());
}
}
|
This part is from the original 0.750rc3 Newuser/user.php, but I canīt tell whether it sends a mail to the admin or the user
| Code: |
// if (pnConfigGetVar('reg_verifyemail')) {
pnMail($email, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion(), 0);
// }
if (pnConfigGetVar('reg_notifyemail') != "") {
$email2 = pnConfigGetVar('reg_notifyemail');
$subject2 = _NOTIFYEMAILSUB;
$message2 = _NOTIFYEMAILCONT1 . "$uname" . _NOTIFYEMAILCONT2;
pnMail($email2, $subject2, $message2, "From: $from\nX-Mailer: PHP/" . phpversion(), 0);
}
OpenTable();
echo "<span class=\"pn-normal\">" . _YOUAREREGISTERED . "</span>";
CloseTable();
}
|
I think itīs the admin (guessing), but the hack doesnīt use the function to verify an email. Putting just those lines in wouldnīt probably work... |
|
|
|
 |
Grendel
Joined: Mar 12, 2004
Posts: 19
Location: 2
Status: Offline
|
  Posted:
Jul 05, 2004 - 11:12 PM |
|
| Quote: |
Is it possible to let users choose their password when registering and validate their email address by an email sent with a validation link?
|
If you donīt let them choose it the verification will work, but if you make a new group between users and admins, i.e. "(premium) members" and lower the permissions for users and have the ones you want for members, you have the ability to "validate" new users as that was possible with the original user.php but not with the hack. The only difference might be that the admin doesnīt get an email when a new user registers. Hmm, but the hack sends out an email to the user when he signs up, how difficult can it be to add a second emailaddress?  |
|
|
|
 |
Grendel
Joined: Mar 12, 2004
Posts: 19
Location: 2
Status: Offline
|
Posted:
Jul 05, 2004 - 11:31 PM |
|
O.k., Iīm not a coder, but it could look something like this...?
| Code: |
function send_email()
$adminmail = pnConfigGetVar('adminmail');
$headers = "From: $sitename <$adminmail>\n"
pnMail($adminmail, _NEWUSERREGISTEREDWHATEVER, $message);
}
|
|
|
|
|
 |
|
|
|