mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Make activate key lenght configurable
This commit is contained in:
parent
0f08b4ea41
commit
e1fb41e558
3 changed files with 5 additions and 4 deletions
|
@ -274,8 +274,9 @@ define('SHOW_PEERS_NAMES', 2);
|
|||
define('SHOW_PEERS_FULL', 3);
|
||||
|
||||
define('SEARCH_ID_LENGTH', 12);
|
||||
define('ACTKEY_LENGHT', 32);
|
||||
define('SID_LENGTH', 20);
|
||||
define('LOGIN_KEY_LENGTH', 12);
|
||||
define('LOGIN_KEY_LENGTH', 32);
|
||||
define('USERNAME_MAX_LENGTH', 25);
|
||||
define('USEREMAIL_MAX_LENGTH', 40);
|
||||
|
||||
|
|
|
@ -535,7 +535,7 @@ if ($submit && !$errors) {
|
|||
*/
|
||||
if ($mode == 'register') {
|
||||
if ($bb_cfg['reg_email_activation']) {
|
||||
$user_actkey = make_rand_str(12);
|
||||
$user_actkey = make_rand_str(ACTKEY_LENGHT);
|
||||
$db_data['user_active'] = 0;
|
||||
$db_data['user_actkey'] = $user_actkey;
|
||||
} else {
|
||||
|
@ -600,7 +600,7 @@ if ($submit && !$errors) {
|
|||
// если что-то было изменено
|
||||
if ($db_data) {
|
||||
if (!$pr_data['user_active']) {
|
||||
$user_actkey = make_rand_str(12);
|
||||
$user_actkey = make_rand_str(ACTKEY_LENGHT);
|
||||
$pr_data['user_actkey'] = $user_actkey;
|
||||
$db_data['user_actkey'] = $user_actkey;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ if (isset($_POST['submit'])) {
|
|||
$username = $row['username'];
|
||||
$user_id = $row['user_id'];
|
||||
|
||||
$user_actkey = make_rand_str(12);
|
||||
$user_actkey = make_rand_str(ACTKEY_LENGHT);
|
||||
$user_password = make_rand_str(8);
|
||||
|
||||
$sql = "UPDATE " . BB_USERS . "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue