pages/Login.nsi
author Neal Gompa <neal@enanocms.org>
Fri, 18 Dec 2009 20:36:15 -0600
changeset 9 100ba25b6dba
parent 2 0c0d5dadfca3
child 10 014d58335b6d
permissions -rw-r--r--
Adding uninstall commands for shortcuts, we don't want unnecessary stuff floating around after the uninstallation...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     1
Page custom CredentialsCreate CredentialsLeave " - Admin login"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     3
Function CredentialsCreate
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     4
  !insertmacro XPUI_HEADER_TEXT "Create administrator" "Enter your desired username and password for administering your site."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     5
  !insertmacro XPUI_INSTALLOPTIONS_EXTRACT_AS "pages\Login.ini" "Login.ini"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     6
  !insertmacro XPUI_INSTALLOPTIONS_DISPLAY "Login.ini"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     7
FunctionEnd
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     8
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     9
Function CredentialsLeave
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    10
  StrCmp $XPUI_ABORTED "1" 0 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    11
    Return
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    12
  
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    13
  ReadIniStr $enano_user "$PLUGINSDIR\Login.ini" "Field 1" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    14
  StrCmp $enano_user "" 0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    15
    MessageBox MB_OK|MB_ICONEXCLAMATION "Please enter a username."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    16
    Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    17
  
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    18
  ReadIniStr $enano_password "$PLUGINSDIR\Login.ini" "Field 2" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    19
  Strlen $0 $enano_password
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    20
  IntCmp $0 6    +3  0  +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    21
    MessageBox MB_OK|MB_ICONEXCLAMATION "Please enter a password that is at least six characters long."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    22
    Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    23
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    24
  ReadIniStr $0 "$PLUGINSDIR\Login.ini" "Field 3" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    25
  StrCmp $0 $enano_password +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    26
    MessageBox MB_OK|MB_ICONEXCLAMATION "The passwords you entered do not match. Please enter them again."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    27
    Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    28
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    29
  ReadIniStr $admin_email "$PLUGINSDIR\Login.ini" "Field 4" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    30
  StrCmp $admin_email "" 0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    31
    MessageBox MB_OK|MB_ICONEXCLAMATION "Please enter your e-mail address."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    32
    Abort
2
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
    33
    
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
    34
  LockWindow on
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    35
FunctionEnd
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    36