Project

General

Profile

Bug #651

Usergroup is not changed when registering through a plan

Added by Anonymous over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
February 04, 2013
Due date:
% Done:

100%

Estimated time:

Description

When setting a plan for members with the edited field «Change user group to ... after plan change» and trying to register a user using this plan it sets «Registered» usergroup instead of chosen one.

History

#1

Updated by Anonymous over 7 years ago

  • % Done changed from 0 to 100

commit:8a99d38

The usergroup is updated now if plan is chosen.

Fast fix:

Open the file [subrion_folder]/front/registration.php
Find the code:

if (isset($_POST['plan_id']) && is_numeric($_POST['plan_id']))
{
    $plan = $iaPlan->getPlanById($_POST['plan_id']);

Insert the code after the found lines:

$usergroup = $plan['usergroup'] ? $plan['usergroup'] : '8';

$iaDb->update(array('id' => $createdAccountId, 'group_memberships' => $usergroup), 0, 0, 'accounts');

Save the changes and try to register again.

#2

Updated by Anonymous over 7 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF