Welcome to Geeklog, Anonymous Friday, November 08 2024 @ 07:37 pm EST
Geeklog Forums
Registration Hack for GL 1.3.7.
Page navigation
Robin
{
global $_TABLES, $LANG04, $_CONF;
$ucount = DB_count($_TABLES[\'users\'],\'username\',$username);
$ecount = DB_count($_TABLES[\'users\'],\'email\',$email);
$email = md5($email);
if ($ucount == 0 AND $ecount == 0) {
# if (COM_isEmail($email)) {
$regdate = strftime(\'%Y-%m-%d %H:%M:$S\',time());
DB_save($_TABLES[\'users\'],\'username,passwd,regdate\',\"\'$username\',\'$email\',\'$regdate\'\");
$uid = DB_getItem($_TABLES[\'users\'],\'uid\',\"username = \'$username\'\");
// Add user to Logged-in group (i.e. members) and the All Users group (which includes
// anonymous users
$normal_grp = DB_getItem($_TABLES[\'groups\'],\'grp_id\',\"grp_name=\'Logged-in Users\'\");
$all_grp = DB_getItem($_TABLES[\'groups\'],\'grp_id\',\"grp_name=\'All Users\'\");
DB_query(\"INSERT INTO {$_TABLES[\"group_assignments\"]} (ug_main_grp_id,ug_uid) values ($normal_grp, $uid)\");
DB_query(\"INSERT INTO {$_TABLES[\"group_assignments\"]} (ug_main_grp_id,ug_uid) values ($all_grp, $uid)\");
DB_query(\"INSERT INTO {$_TABLES[\"userprefs\"]} (uid) VALUES ($uid)\");
if ($_CONF[\'emailstoriesperdefault\'] == 1) {
DB_query(\"INSERT INTO {$_TABLES[\"userindex\"]} (uid) VALUES ($uid)\");
} else {
DB_query(\"INSERT INTO {$_TABLES[\"userindex\"]} (uid,etids) VALUES ($uid, \'-\')\");
}
DB_query(\"INSERT INTO {$_TABLES[\"usercomment\"]} (uid) VALUES ($uid)\");
DB_query(\"INSERT INTO {$_TABLES[\"userinfo\"]} (uid) VALUES ($uid)\");
if ($_CONF[\'usersubmission\'] == 1) {
$queueUser = true;
if (!empty ($_CONF[\'allow_domains\'])) {
$allowed = explode (\',\', $_CONF[\'allow_domains\']);
// Note: We already made sure $email is a valid address
$domain = substr ($email, strpos ($email, \'@\') + 1);
if (in_array ($domain, $allowed)) {
$queueUser = false;
}
}
if ($queueUser) {
$passwd = md5(\'\');
DB_change($_TABLES[\'users\'],\'passwd\',\"$passwd\",\'username\',$username);
$msg = 48;
} else {
# emailpassword($username, 1);
$msg = 1;
}
if (isset ($_CONF[\'notification\']) && in_array (\'user\', $_CONF[\'notification\'])) {
sendNotification ($username, $email, $uid, $queueUser);
}
} else {
# emailpassword($username, 1);
$msg = 1;
if (isset ($_CONF[\'notification\']) && in_array (\'user\', $_CONF[\'notification\'])) {
sendNotification ($username, $email, $uid, false);
}
}
DB_change($_TABLES[\'usercomment\'],\'commentmode\',$_CONF[\'comment_mode\'],\'uid\',$uid);
DB_change($_TABLES[\'usercomment\'],\'commentlimit\',$_CONF[\'comment_limit\'],\'uid\',$uid);
return COM_refresh($_CONF[\'site_url\'] . \'/index.php?msg=\' . $msg);
} else {
# $retval .= COM_siteHeader(\'Menu\') . newuserform($LANG04[18]) . COM_siteFooter();
}
# } else
{
$retval .= COM_siteHeader(\'Menu\') . newuserform($LANG04[19]) . COM_siteFooter();
}
return $retval;
}
Geeklog Polish Support Team
Anonymous
Anonymous
WannaFIsh39
D1
What an old man can see, a young man will never see even though he is standing at the top of the highest mountain.
WannaFish39
Robin
Geeklog Polish Support Team
WannaFish39
m311b
m311b
darkork
I get parse error when I try to create a new account.
Probably the code of the new version is different ??
Robin
Sorry for not updating the hack but as I mentioned earlier my host switched phpmail on.
However very recently they disabled this again (moody bastards ;-) so I will take a look at the latest code to see how this hack could be achieved.
Geeklog Polish Support Team
Blaine
If not, the COM_mail() now checks for a CUSTOM_mail() and if it exists - it will be used instead.
Geeklog components by PortalParts -- www.portalparts.com
Raja
But now.... My users can't put in an email address at all and I keep getting bounced emails everytime one of these newer users get a pm.
How can I have new users sign up immediately by choosing their own password and still enter their email adress in as well????
rjrufo
Edit: I have the email password part successfully canceled, so I - or anyone else - will not be able to get the generated password. It's on my "development" site, one that is not accessible from the internet, so I'm not concerned about new people registering and not being able to log in, but I'd like to implement this on the "live" site as soon as possible.
Thanks
InDio
The thing is I can't figure out the structure of the code used to output the newuser form, and the code to get the data to the database. It's no big deal INSERTing data from a form into mysql, but geeklog's code structure is a little more complicated than ifs and thens.....
Anyone gone any further with deactivating the email passwd? I think the devel team should give us a hand here...
Page navigation
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content