"serph, post: 66794, member: 1398":
$site_config['CONFIRMEMAIL'] = false; //Enable / Disable Signup confirmation email
should be set to false
SQL_Query_exec("UPDATE users SET status = 'confirmed' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
SQL_Query_exec("UPDATE invites SET confirmed='yes' WHERE inviteid IN (" . implode(", ", $_POST['conusr']) . ") AND confirmed='no'");
...else{
if ($site_config["INVITEONLY"] && $site_config["CONFIRMEMAIL"]){
$status = "pending";
}else{
$status = "confirmed"; <---- HERE below this
} "serph, post: 66792, member: 1398":
did you remove the @SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System', 'New User:".$wantusername." ')"); in account-signup.php
on my site its removing the created invite after you confirm the user i need [USER=311]@MicroMonkey[/USER] to test it on his end and see if its doing the same for him
"serph, post: 66790, member: 1398":
Deleting a code gives you the code back that's what it's supposed to do confirming a pending member removes the created code after you have confirmed them and you don't get the invite back the invites are already reduced because you've created a code ie -1 invite or am I not understanding your post
"serph, post: 66788, member: 1398":
ok ive got it working looks like the ajshoutbox code was cuasing it to bug out remove it from account-signup.php
@SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System', 'New User:".$wantusername." ')");
it working for me if it works for everyone else ill clean up the code a bit and post in completed ive found one bug that needs sorted
"MicroMonkey, post: 66786, member: 311":
the invited_by table in my test database shows 1, so I have to assume its working and I saw no such errors in my tests. invitedate is also recorded
$ret = SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, age, country, gender, client, stylesheet, language, class, ip, invited_by, invitedate) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip(), $i["inviter"], get_date_time()))).")");"MicroMonkey, post: 66782, member: 311":
should solve the "nothing selected" problem. Still thinking about the other issues
takeconfirm.php
<?php
require_once("backend/functions.php");
dbconn();
$id = (int) $_GET["id"];
if (!@count($_POST['conusr'])) autolink("invite.php", "Nothing Selected.");
SQL_Query_exec("UPDATE users SET status = 'confirmed' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
SQL_Query_exec("UPDATE invites SET confirmed='yes' WHERE inviteid IN (" . implode(", ", $_POST['conusr']) . ") AND confirmed='no'");
header("Refresh: 0; url=invite.php?id=$id");
?>
"MicroMonkey, post: 66759, member: 311":
Oh, ok , very well then. 1 mistake found. In account-signup.php
find
$id = mysqli_insert_id($GLOBALS[DBconnector]);
change to
$id = mysqli_insert_id($GLOBALS["DBconnector"]);
double quotes missing. It would screw up everything if it cant connect to the database.
@SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System', 'New User:".$wantusername." ')");
$id = mysqli_insert_id($GLOBALS["DBconnector"]);"serph, post: 66768, member: 1398":
what page and line num is the implode error your getting [USER=20311]@shadows[/USER] ?
"MicroMonkey, post: 66757, member: 311":
also, I guess you have to use the edits listed in the original mod? https://www.torrenttrader.xyz/index.php?threads/invite-code-system.3246/ There are quite a few edits that need to be done to that also. mysql_query needs changed, mysql_insert_id, etc
"MicroMonkey, post: 66755, member: 311":
the files have a few short open php tags. Will cause issues if your php is set to not use open tags. Close the tags ie:<?php, not <? . I only saw this by looking at the code. I did not test this mod yet, so maybe after I give it a try I can help more, but I would start there
"serph, post: 66753, member: 1398":
problem is mate this mod was made for tbdev about 10 years ago i modded it to work with v2.05 nearly 9 yrs ago wow takes me back
needs a proper updating to newest version and im rusty as get out ill tinker with it if i get it ill post but wont be till weekend need to set a dev site up etc
and you said you had a
2. After signup, it shows "Database Error. Please report this to an administrator." (the account is being created)
and theres nothing in the sqlerr log in admincp?
"serph, post: 66751, member: 1398":
whats the db error your getting ? and what version of tt are you using ?
and yeah ive just noticed its not deleteing the invite after confirm user mmm was working this morning
tbh i dont have alot of time to debug but im sure its to do with the $id = (int) $_GET["id"]; (not getting the id )
if anyone wants to give a hand its been a number of years since i messed with code
"m-jay, post: 66686, member: 20288":
Password verify is on account login and for the converter it's a specific piece of code which I'll highlight in case some one else can help
That post you linked to is a good example it's just a case of defining password lenght (bycryt is longer) then verify or update old password then verify, its bugging me I'm so close
"m-jay, post: 66684, member: 20288":
Think I finally got bcrypt or argon2 encryption working for fresh install of v3
For old boards I'm still struggling to convert the old md5 passwords the only option is to recover account. I'll post what I have just doing some last test.
Another way is possibly having a back door like account-login2.php to login with old passwords then members can reset password in account settings
"nitro, post: 66677, member: 20322":
Hello, where do I find this mode?