Link to "Forgot your password?"

Message board links from 2010 as taken from the Internet Wayback Machine pages.
Post Reply
User avatar
admin
Site Admin
Posts: 159
Joined: Mon Aug 26, 2013 3:47 pm

Re: Link to "Forgot your password?"

Post by admin »

09-01-2009 2:35 AM
Rob
Top 25 Contributor
Joined on 08-25-2009
Posts 20

Forgot your password?
Reply Contact

I have developed a mod for changing passwords when you've forgotten what it is so the admin does't have to do it. It is designed to work in version 3. Its comprised of 2 asp files and all you have to do is create a 'Forgot your password' link to one of the pages from the login page.

First it validates the email address against email addresses in the db then it sends a pw change request to that email address so only the owner of the email address can authorize the change. Then the password is changed and emiled back.

Is anyone interested in it? I'm just not sure if I should post all the code in this post or if the files can be attached to it.

Cheers
Rob
Filed under: customization, mod
09-01-2009 7:09 AM In reply to
Spooky
Top 10 Contributor
Joined on 08-19-2009
Denver CO
Posts 49

Re: Forgot your password?
Reply Contact

I would be interested in seeing it. I do not think you can do attachments here though.
09-01-2009 7:14 AM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 84

Re: Forgot your password?
Reply Contact

I like this idea!
09-01-2009 9:17 AM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 456

Re: Forgot your password?
Reply Contact

Let me see if I can get this thing configured right so you can upload those files.
09-01-2009 6:12 PM In reply to
SQLDude
Top 50 Contributor
Joined on 09-01-2009
Posts 5

Re: Forgot your password?
Reply Contact
Sure, count me in, please.
09-01-2009 7:02 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 456

Re: Forgot your password?
Reply Contact

Attachments seem to be causing errors on the thread. If you want to email the files to me I can set them up for download.
09-01-2009 7:07 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: Forgot your password?
Reply Contact

I would love to get a copy of this coding

you can always email it to me

drizzt09@gmail.com



thanks
09-02-2009 10:10 AM In reply to
DesertDog2
Top 25 Contributor
Joined on 09-02-2009
Posts 16

Re: Forgot your password?
Reply Contact

Sounds great im in!

On the same note I forgot my password for this forum and used the forgot password link and never received the email, not sure if its working correctly. Anyway I just created a new account so I could create this post. Just an FYI.
09-02-2009 9:35 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 456

Re: Forgot your password?
Reply Contact

I'll look into that as well. In the meantime, anyone who wants Rob's code can download it at http://www.brainjar.com/AspFootballPool ... ssword.zip

Nicely done.
Filed under: customization, password
09-04-2009 6:25 AM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 84

Re: Forgot your password?
Reply Contact

Rob! Nicely done! This code rocks!!
09-06-2009 10:32 AM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: Forgot your password?
Reply Contact

ok got this working using the gmail server code, except when the emails come through they dont look right. they are printing all the HTML coding instead of using the coding. I have checked in live and gmail, through web and outlook. also thorugh my work email on exchange/outlook

This is how they look in the emails:

Password Change Request
A request has been made to change your password. <a href=http://nflpool.tk/userPasswordChange.as ... &id=AC01B9>

Click here</a> to comfirm this change or delete this email to cancel the request.


Password Changed
Your password has been changed. The new password is <b>KITGBQ</b>.<br><br><br>Login at

<a href=http://waverly.brinkster.net>http://waverly.brinkster.net</a> to begin playing.


09-06-2009 2:21 PM In reply to
DesertDog2
Top 25 Contributor
Joined on 09-02-2009
Posts 16

Re: Forgot your password?
Reply Contact

same result in outlook.
09-06-2009 3:05 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: Forgot your password?
Reply Contact

ok Rob gave me the fix for this

replacing the line

cdoMessage.TextBody = bodyText

with

cdoMessage.HTMLBody = bodyText

in email.asp solved it. Good work Rob.

09-07-2009 6:00 PM In reply to
DesertDog2
Top 25 Contributor
Joined on 09-02-2009
Posts 16

Re: Forgot your password?
Reply Contact

That did it thanks.
09-09-2009 6:17 AM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 84

Re: Forgot your password?
Reply Contact

drizzt09:

ok Rob gave me the fix for this

replacing the line

cdoMessage.TextBody = bodyText

with

cdoMessage.HTMLBody = bodyText

in email.asp solved it. Good work Rob.


Won't this affect all e-mails that are sent? When I did that I had to add HTML formatting to all of my pages that send an e-mail. Especially the updateScores.asp and updateSchedules.asp because the e-mail will be one line of text like this:
The game schedule for Week 1 has been updated. Thu 9/10 8:30 pm TEN at PIT Sun 9/13 1:00 pm DAL at TB Sun 9/13 1:00 pm DEN at CIN Sun 9/13 1:00 pm DET at NO Sun 9/13 1:00 pm JAX at IND Sun 9/13 1:00 pm KC at BAL Sun 9/13 1:00 pm MIA at ATL Sun 9/13 1:00 pm MIN at CLE Sun 9/13 1:00 pm NYJ at HOU Sun 9/13 1:00 pm PHI at CAR Sun 9/13 4:15 pm SF at ARI Sun 9/13 4:15 pm STL at SEA Sun 9/13 4:15 pm WAS at NYG Sun 9/13 8:20 pm CHI at GB Mon 9/14 7:00 pm BUF at NE Mon 9/14 10:15 pm SD at OAK (All times Eastern)

Page 1 of 2 (21 items) 1 2 Next >
User avatar
admin
Site Admin
Posts: 159
Joined: Mon Aug 26, 2013 3:47 pm

Re: Link to "Forgot your password?"

Post by admin »

09-09-2009 9:59 AM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 456

Re: Forgot your password?
Reply Contact

That's true. To avoid it, you could create a separate function just for HTML email as described in this thread.
Filed under: customization, email
08-25-2010 7:25 AM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 84

Re: Forgot your password?
Reply Contact

I've modified Rob's code for the Password Reset function to work with 4.0. You can download it here. Just unzip the files to the root of your pool. You will need to overwrite the userLogin.asp file so the link shows up correctly.
Filed under: customization, mod, password, email
09-18-2010 8:54 AM In reply to
Tango
Top 25 Contributor
Joined on 09-06-2009
Posts 26

Re: Forgot your password?
Reply Contact

Hello,

I cant seem to find that in my email.asp.

Here it is:

<% '**************************************************************************

'* Common code for emailing. *

'* *

'* Note: The email process is host-specific. You will need to customize *

'* the SendMail() function to work in your target environment. *

'**************************************************************************

'--------------------------------------------------------------------------

' Returns an array of email addresses for users who have opted to receive

' the given notification type.

'--------------------------------------------------------------------------

function GetNotificationList(notificationType)

dim sql, rs

dim list, email

GetNotificationList = Array()

sql = "SELECT EmailAddress FROM Users WHERE " & notificationType & " = true"

set rs = DbConn.Execute(sql)

do while not rs.EOF

email = Decrypt(rs.Fields("EmailAddress").Value)

if email <> "" then

list = list & email & ";"

end if

rs.MoveNext

loop

if Len(list) > 0 then

GetNotificationList = Split(list, ";")

end if

end function

'--------------------------------------------------------------------------

' Returns true if the given address is in valid email address format, false

' otherwise.

'--------------------------------------------------------------------------

function IsValidEmailAddress(addr)

dim list, item

dim i, c

IsValidEmailAddress = true

'Exclude any address with '..'.

if InStr(addr, "..") > 0 then

IsValidEmailAddress = false

exit function

end if

'Split email address into the user and domain names.

list = Split(addr, "@")

if UBound(list) <> 1 then

IsValidEmailAddress = false

exit function

end if

'Check both names.

for each item in list

'Make sure the name is not zero length.

if Len(item) <= 0 then

IsValidEmailAddress = false

exit function

end if

'Make sure only valid characters appear in the name.

for i = 1 to Len(item)

c = Lcase(Mid(item, i, 1))

if InStr("abcdefghijklmnopqrstuvwxyz&_-.", c) <= 0 and not IsNumeric(c) then

IsValidEmailAddress = false

exit function

end if

next

'Make sure the name does not start or end with invalid characters.

if Left(item, 1) = "." or Right(item, 1) = "." then

IsValidEmailAddress = false

exit function

end if

next

'Check for a '.' character in the domain name.

if InStr(list(1), ".") <= 0 then

IsValidEmailAddress = false

exit function

end if

end function

'--------------------------------------------------------------------------

' Converts a formatted point spread to plain text, for use in email.

'--------------------------------------------------------------------------

function GetPlainTextPointSpread(spread)

dim str

GetPlainTextPointSpread = ""

str = FormatPointSpread(spread)

str = Replace(str, "&nbsp;", "")

str = Replace(str, "&frac12;", " 1/2")

GetPlainTextPointSpread = str

end function

'--------------------------------------------------------------------------

' Sends an email and returns an empty string if successful. Otherwise, it

' returns the error message.

'--------------------------------------------------------------------------



 

function SendMail(toAddr, subjectText, bodyText)

dim mailer

'Assume all will go well.

SendMail = ""

'Configure the message.

set mailer = Server.CreateObject("Persits.MailSender")

mailer.Host = "72.18.128.140"

mailer.Port = 2525

mailer.From = ADMIN_EMAIL

mailer.FromName = ADMIN_USERNAME

mailer.AddAddress(toAddr)

mailer.Subject = subjectText

mailer.Body = bodyText

'Send it.

on error resume next

mailer.Send

'If an error occurred, return the error description.

if Err.Number <> 0 then

SendMail = Err.Description

end if

'Clean up.

set mailer = Nothing

end function %>
09-18-2010 9:02 AM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 84

Re: Forgot your password?
Reply Contact

Tango:

Hello,

I cant seem to find that in my email.asp.

Here it is:

Can't seem to find what exactly?
09-18-2010 9:11 AM In reply to
Tango
Top 25 Contributor
Joined on 09-06-2009
Posts 26

Re: Forgot your password?
Reply Contact
Oops, I thought I quoted it.... __________________________ ok Rob gave me the fix for this replacing the line cdoMessage.TextBody = bodyText with cdoMessage.HTMLBody = bodyText in email.asp solved it. Good work Rob.
09-18-2010 9:17 AM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: Forgot your password?
Reply Contact

ya that fix is on the 1st page of this thread

Page 2 of 2 (21 items) < Previous 1 2
Post Reply