Changeset 25
- Timestamp:
- 12/29/2004 01:22:27 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-config-sample.php
r20 r25 13 13 $bb->name = 'New bbPress Site'; 14 14 15 $bb->admin_email = 'you@example.com'; 15 16 $bb->mod_rewrite = false; 16 17 $bb->page_topics = 30; -
trunk/bb-includes/functions.php
r24 r25 186 186 return $bb->domain; 187 187 break; 188 case 'admin_email' : 189 return $bb->admin_email; 190 break; 188 191 endswitch; 189 192 } -
trunk/bb-includes/registration-functions.php
r24 r25 19 19 function bb_new_user( $username, $email, $website, $location, $interests ) { 20 20 global $bbdb; 21 $now = current_time('mysql'); 22 $password = bb_random_pass(); 21 $now = bb_current_time('mysql'); 22 $password = bb_random_pass(); 23 $passcrypt = md5( $password ); 23 24 24 25 $bbdb->query("INSERT INTO $bbdb->users 25 26 (username, user_regdate, user_password, user_email, user_website, user_from, user_interest) 26 27 VALUES 27 ('$username', '$now', '$pass word','$email', '$website', '$location', '$interests')");28 ('$username', '$now', '$passcrypt', '$email', '$website', '$location', '$interests')"); 28 29 29 30 $user_id = $bbdb->insert_id; 31 bb_send_pass( $user_id, $password ); 30 32 bb_do_action('bb_new_user', $user_id); 31 33 return $user_id; … … 39 41 return $password; 40 42 } 43 44 function bb_send_pass( $user, $pass ) { 45 global $bbdb; 46 $user = (int) $user; 47 $user = $bbdb->get_row("SELECT * FROM $bbdb->users WHERE user_id = $user"); 48 49 if ( $user ) : 50 mail( $user->user_email, bb_get_option('name') . ': Password', "Your password is: $pass 51 You can now login: " . bb_get_option('uri') . " 52 53 Enjoy!", 'From: ' . bb_get_option('admin_email') ); 54 55 endif; 56 } 41 57 ?>
Note: See TracChangeset
for help on using the changeset viewer.