Mirage Source
http://www.miragesource.net/forums/

Email Required On Account Creation.
http://www.miragesource.net/forums/viewtopic.php?f=183&t=5595
Page 1 of 73

Author:  Jack [ Thu May 14, 2009 6:53 pm ]
Post subject:  Email Required On Account Creation.

Having a email verafaction is good just in case people loose there passwords, and also good for warnings and ban reasons instead of the msgbox.

---------
Basicly easy to copy and paste 2/5
Understanding 3/5

///CLIENT SIDE///


Make your SendNewAccount Look like this.

Code:
Sub SendNewAccount(ByVal Name As String, ByVal Password As String, ByVal Email As String)
Dim Packet As String

    Packet = "newaccount" & SEP_CHAR & Trim(Name) & SEP_CHAR & Trim(Password) & SEP_CHAR & Trim(Email) & SEP_CHAR & END_CHAR
    Call SendData(Packet)
End Sub


Add these into ModConstants

Now add:
Code:
Public Const MENU_STATE_EMAIL = 9


Right now add:
Code:
Public Const EMAIL_LENGTH = 50


Now Find Private SUb Pic_Connect in frmNewaccount and add:

Code:
If Trim(txtName.Text) <> "" And Trim(txtPassword.Text) <> "" And Trim(txtEmail.Text) <> "" Then


Now find Public Sub MenuState(ByVal State As Long) and go to Call SendNewaccount and add:

Code:
frmNewAccount.txtEmail.Text



Now on form frmNewAccount add these:
A text Box with the name of txtEmail and set the caption to nothing(THE NAME OF THE TEXT BOX MATTERS)
Put a label and call it labelemail and set the caption to Email (Doesn't matter on the name of the label)

Ok thats all for Client Side..

///Server Side///

Make your AddAccount look like this:

Code:
Sub AddAccount(ByVal index As Long, ByVal Name As String, ByVal Password As String,ByVal Email As String)
Dim i As Long

    Player(index).Login = Name
    Player(index).Password = Password
    Player(index).Email = Email
   
    For i = 1 To MAX_CHARS
        Call ClearChar(index, i)
    Next i
   
    Call SavePlayer(index)
End Sub


Add Under AccountRec:

Code:
Type EmailRec
    Email As String * EMAIL_LENGTH
End Type


And Now in AccountRec add to the bottom of it:
Code:
Email as string


Now go to ModConstants and add the 2 following constants:

Code:
Public Const EMAIL_LENGTH = 50

Code:
Public Const MAX_EMAIL = 15


Under HandleData add :
Code:
Dim Email As String


Add Under New account Packet

Code:
Email = Parse(3)


And just below that add next to
Code:
Or Len(Trim(Password)) < 3


Code:
Or Len(Trim(Email)) < 15


now find If Not AccountExist(Name) Then change the line Call AddAccount(index, Name, Password) to look like this:

Code:
Call AddAccount(index, Name, Password, Email)


Now find
Code:
Call PutVar(FileName, "GENERAL", "Password", Trim(Player(index).Password))


and add under it.

Code:
Call PutVar(FileName, "GENERAL", "Email", Trim(Player(index).Email))


I think thats about it msn me if there is any problems

Author:  Labmonkey [ Thu May 14, 2009 8:13 pm ]
Post subject:  Re: Email Required On Account Creation.

How would you add a "forgot password" button.

Author:  Jack [ Thu May 14, 2009 8:31 pm ]
Post subject:  Re: Email Required On Account Creation.

add a button then setup either email to ask and have a auto responce with the account name and email in the email, or have it so there are 2 text boxes that have email and account name and then when you click ok it will send you a email. I could try code this if you want me to.

Author:  Tony [ Thu May 14, 2009 10:29 pm ]
Post subject:  Re: Email Required On Account Creation.

Hmm would be better if it was email verification. It's a bit useless at the moment but it's a good start.

Author:  Labmonkey [ Fri May 15, 2009 12:07 am ]
Post subject:  Re: Email Required On Account Creation.

How do you send email from vb was my real question.

Author:  Nean [ Fri May 15, 2009 2:07 am ]
Post subject:  Re: Email Required On Account Creation.

Perhaps this can help: http://www.devarticles.com/c/a/Visual-B ... ual-Basic/

Author:  GIAKEN [ Fri May 15, 2009 6:43 am ]
Post subject:  Re: Email Required On Account Creation.

http://www.freevbcode.com/ShowCode.Asp?ID=109

Author:  Jack [ Fri May 15, 2009 3:29 pm ]
Post subject:  Re: Email Required On Account Creation.

Right im going to work on forgot password button all this weekend, hopefully it wont take that long. Tutorial will be made as soon as i finish.

Author:  wanai [ Wed Dec 01, 2021 8:56 am ]
Post subject:  Re: Email Required On Account Creation.

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо

Author:  wanai [ Tue Jan 04, 2022 7:43 pm ]
Post subject:  Re: Email Required On Account Creation.

Econ

Author:  wanai [ Tue Jan 04, 2022 7:44 pm ]
Post subject:  Re: Email Required On Account Creation.

95

Author:  wanai [ Tue Jan 04, 2022 7:45 pm ]
Post subject:  Re: Email Required On Account Creation.

Bett

Author:  wanai [ Tue Jan 04, 2022 7:46 pm ]
Post subject:  Re: Email Required On Account Creation.

Bett

Author:  wanai [ Tue Jan 04, 2022 7:48 pm ]
Post subject:  Re: Email Required On Account Creation.

Clif

Author:  wanai [ Tue Jan 04, 2022 7:49 pm ]
Post subject:  Re: Email Required On Account Creation.

Dean

Author:  wanai [ Tue Jan 04, 2022 7:50 pm ]
Post subject:  Re: Email Required On Account Creation.

Mich

Author:  wanai [ Tue Jan 04, 2022 7:51 pm ]
Post subject:  Re: Email Required On Account Creation.

Harl

Author:  wanai [ Tue Jan 04, 2022 7:52 pm ]
Post subject:  Re: Email Required On Account Creation.

Esta

Author:  wanai [ Tue Jan 04, 2022 7:53 pm ]
Post subject:  Re: Email Required On Account Creation.

Mere

Author:  wanai [ Tue Jan 04, 2022 7:54 pm ]
Post subject:  Re: Email Required On Account Creation.

Fiel

Author:  wanai [ Tue Jan 04, 2022 7:55 pm ]
Post subject:  Re: Email Required On Account Creation.

Clar

Author:  wanai [ Tue Jan 04, 2022 7:56 pm ]
Post subject:  Re: Email Required On Account Creation.

Barb

Author:  wanai [ Tue Jan 04, 2022 7:58 pm ]
Post subject:  Re: Email Required On Account Creation.

Colu

Author:  wanai [ Tue Jan 04, 2022 7:59 pm ]
Post subject:  Re: Email Required On Account Creation.

Stok

Author:  wanai [ Tue Jan 04, 2022 8:00 pm ]
Post subject:  Re: Email Required On Account Creation.

Kona

Page 1 of 73 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/