dquigley
New Member
- Messages
- 249
- Reaction score
- 0
- Points
- 0
Hello,
Currently someone has helped me tweak my site so that when someone creates an account on my site the account is also created on the forum, so they are basically linked, here is the code how he did that.
Now my only problem with that is that when you create a account on my site it is "inactive" once you pay it is activated and then you are given access to all the features.
So what I would like to do is change the above code so that new forum accounts are also "inactive" I know there is a way to manually deactivate forum accounts in the admin panel so I am guessing there is coding to do this.
Then, I would also like the coding to "activate" the forum account, that way once they pay I can have the account automatically activated. Thank you for your help.
Also on the site members can change there password, the problem with that is if a member changes there password on the site it will not correctly log them into the forums anymore.
I would like to change the coding so that if the password on the site is changed then the password to there forum account is changed as well thank you.
Currently someone has helped me tweak my site so that when someone creates an account on my site the account is also created on the forum, so they are basically linked, here is the code how he did that.
PHP:
// phpBB register part
// Retrieve default group ID
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
WHERE group_name = '" . $db->sql_escape('REGISTERED') . "'
AND group_type = " . GROUP_SPECIAL;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row)
{
trigger_error('NO_GROUP');
}
$group_id = $row['group_id'];
$data = array(
'username' => utf8_normalize_nfc(request_var('loginid', '', true)),
'user_password' => phpbb_hash(request_var('password', '', true)),
'user_email' => strtolower(request_var('email', '')),
'group_id' => (int) $group_id,
'user_type' => USER_NORMAL,
'user_ip' => $user->ip,
);
$user_id = user_add($data);
// phpBB register part end
// phpBB login part
if(login_user($loginid, $password)) {
$username = request_var('loginid', '', true);
$password = request_var('password', '', true);
$autologin = false;
$result = $auth->login($username, $password, $autologin);
// Hope for the best
}
// phpBB login part end
Now my only problem with that is that when you create a account on my site it is "inactive" once you pay it is activated and then you are given access to all the features.
So what I would like to do is change the above code so that new forum accounts are also "inactive" I know there is a way to manually deactivate forum accounts in the admin panel so I am guessing there is coding to do this.
Then, I would also like the coding to "activate" the forum account, that way once they pay I can have the account automatically activated. Thank you for your help.
Also on the site members can change there password, the problem with that is if a member changes there password on the site it will not correctly log them into the forums anymore.
I would like to change the coding so that if the password on the site is changed then the password to there forum account is changed as well thank you.
Last edited: