Forum Index   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
GloubOffline



Joined: Jun 07, 2004
Posts: 9

Status: Offline
Post   Posted: Jun 14, 2004 - 01:42 PM Reply with quote Back to top

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
View user's profile Send private message
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Jun 14, 2004 - 02:13 PM Reply with quote Back to top

That (also) will be in pn8 (I think)... it wasn't until now.
Wink

_________________
Chestnut ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
DusterOffline



Joined: Jun 04, 2004
Posts: 4

Status: Offline
Post   Posted: Jun 14, 2004 - 07:43 PM Reply with quote Back to top

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.
View user's profile Send private message
NutterOffline



Joined: Jun 28, 2004
Posts: 1

Status: Offline
Post 22 Posted: Jun 28, 2004 - 03:29 PM Reply with quote Back to top

Is there a way of editing the text conain in the emails sent out by this hack?
TIA
View user's profile Send private message Visit poster's website
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Jun 28, 2004 - 10:51 PM Reply with quote Back to top

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.
Wink

_________________
Chestnut ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
GrendelOffline



Joined: Mar 12, 2004
Posts: 19
Location: 2
Status: Offline
Post   Posted: Jul 05, 2004 - 10:56 PM Reply with quote Back to top

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...
View user's profile Send private message
GrendelOffline



Joined: Mar 12, 2004
Posts: 19
Location: 2
Status: Offline
Post   Posted: Jul 05, 2004 - 11:12 PM Reply with quote Back to top

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? Smile
View user's profile Send private message
GrendelOffline



Joined: Mar 12, 2004
Posts: 19
Location: 2
Status: Offline
Post 18 Posted: Jul 05, 2004 - 11:31 PM Reply with quote Back to top

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);
}
View user's profile Send private message
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits
DarkMindZ