![]() |
Sergey Kornilov admin 10/29/2007 |
You need to provide more details on this. |
L
|
lonestar author 10/29/2007 |
Ideally, I'd like to require at least 6 characters, a mix of letters and numbers, at least one capital letter, and no special characters. If the password fails to meet this it'd simply inform the user that they need to choose a stronger password. |
![]() |
Sergey Kornilov admin 10/30/2007 |
The following code can be placed to BeforeRegister event. if len(pass)<6 then BeforeRegister=false exit function end if pass = dict("password") dim numbers,specials,i,c numbers=0 specials=0 for i=1 to len(pass) c=asc(mid(pass,i,1)) if c>=asc("0") and c<=asc("9") then numbers=numbers+1 elseif not (c>=asc("a") and c<=asc("z") or c>=asc("A") and c<=asc("Z")) then specials=specials+1 end if next if numbers<1 or specials<1 then BeforeRegister=false exit function end if BeforeRegister=true |
D
|
DeStRoY 10/30/2007 |
newbi here... |
![]() |
Sergey Kornilov admin 10/30/2007 |
This code needs to be placed to BeforeRegister event (Events tab). |
D
|
DeStRoY 10/31/2007 |
This code needs to be placed to BeforeRegister event (Events tab). Replace "password" with the actual name of the password field.
|
![]() |
Sergey Kornilov admin 10/31/2007 |
I see what you saying. |
L
|
lonestar author 11/1/2007 |
For this to work you must move pass = dict("password")
if len(pass)<6 then |
D
|
DeStRoY 11/2/2007 |
Everything seems to be working. Thanks for the help! |