send randomly generated paswd in email for lavalair

Started on the old forum in January 2012 · view the original in the archive · old links redirect here

6 replies · 821 views · started 14 years ago · 1 min read

4 participants
mirror Developer · 108 posts #1

hey friends any one using lavalair in which users get randomly generated paswd in email , i dnt want users to choose their own paswd while registering bcoz many end up using username as paswd . Any lavalair coders reply pls

arnage Lead · 811 posts #2

Easier is to compare those two vars while registering and if are the same throw a notice.

if (strcmp($register_name, $password) == 0) {
	echo 'The passwords can not be same as username!';
}

Forcing users to remember some random pass just isn't good. Anyway, there is many ways to generate random things, one is:

$password = substr(uniqid(rand(), true), 0, 5); // for 5 digits
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
mirror Developer · 108 posts #3

i wasnt able to code tht activating users by sending activation code in email so i hve asked for this thing bro , hope this helps to keep a check on fake ids at least who register with invalid email ids , thnks i will try to use this

mirror Developer · 108 posts #4

arnage wrote: Easier is to compare those two vars while registering and if are the same throw a notice.

if (strcmp($register_name, $password) == 0) {
	echo 'The passwords can not be same as username!';
}

Forcing users to remember some random pass just isn't good. Anyway, there is many ways to generate random things, one is:

$password = substr(uniqid(rand(), true), 0, 5); // for 5 digits

okay where shud i place this random generated paswd code in my register.php , should i remove this line here in register.php $pwd = $_POST["pwd"]; bcoz i hve to remove password field in registration form

arnage Lead · 811 posts #5

Wherever you want. Work it out bro, test, try, do something yourself and than if don't work ask for help. The question is not "where to put the code", the question is"how to apply this code". Very different things.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
monirnsp Newbie · 3 posts #6

I am a newibe.plz tell me how can i send pass and validation code or link via mobile phone number....pls help me.

ewanz Developer · 187 posts #7

owh... good idea.. he means that in register field no need to to put password.. password will given in email.. but it make trouble for some users... that mean users must change the random password by tool to make own password...

monirnsp wrote: I am a newibe.plz tell me how can i send pass and validation code or link via mobile phone number....pls help me.

just use sms api..

our lfe is simple words.... 😌 http://mygenkz.net ewanz06@yahoo.com

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close