Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7637589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:58:46+00:00 2026-05-31T07:58:46+00:00

I have a system in which users can register with my forum via the

  • 0

I have a system in which users can register with my forum via the website using PHP. I now need the ability to assign them to groups when this happens… or in some cases create a new group and assign them to it.

I’ve had a look around the phpBB files but cannot figure out which parts of the scripts are responsible for this work.

Basically I need the following operations:

  • Ability to dynamically create a group
  • Ability to add user to a group
  • Ability to set group permissions for a forum

This all has to be dynamic as the system needs to be automated and not managed via the ACP.

If anyone could point me in the right direction for these that would be great.


Solved – 13/03/2012

Here’s the solution I came up with utlising group_create() from includes/functions_user.php.

$group_id = FALSE; // can be 0 as well
$group_type = GROUP_HIDDEN;
$group_name = "Tom's Group";
$group_desc = "Users from Tom's Group";

// just leave these as defaults
$group_attributes = array(
    //'group_colour' => 0,
    //'group_rank' => 0, 
    //'group_avatar' => 0, 
    //'group_avatar_type' => 0,
    //'group_avatar_width' => 0,
    //'group_avatar_height' => 0,
    'group_legend' => 0,
);

$allow_desc_bbcode = TRUE;
$allow_desc_urls = TRUE;
$allow_desc_smilies = TRUE;

$response = group_create($group_id, $group_type, $group_name, $group_desc, $group_attributes, $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies);

Note that if you set $group_id as an existing group in your database then it will modify that group.
I also set group_legend as 0 because I don’t want hidden groups to be seen on the forum.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:58:48+00:00Added an answer on May 31, 2026 at 7:58 am

    There’s a section called area51.phpbb.
    There are bugs tracker, discussions and documents about phpBB development.

    Here’s something I’ve found that is related to adding/editing groups.

    http://area51.phpbb.com/docs/code/30x/phpbb3/package-functions.html#group_create()

    According to it , the function group_create is in:

    includes/functions_user.php at line 2442

    Check out also the next links:

    http://wiki.phpbb.com/Main_Page

    http://area51.phpbb.com/phpBB/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an system with which users can upload a CSV file via an
I need to develop a CRM system which will allow users to have a
I have been working on an ajax/php chat system where users can obviously chat
I have make a messaging system in which user can send messages to each
I have a system which contains multiple applications connected together using JMS and Spring
I can't register new users, or modify user passwords, on our Kohana built website
I have an Android app which I use to register users on my web
I have a system which allows users to enter HTML-reserved characters into a text
I have a Debian Squeeze system which is using libnss-ldap to bind to a
I have a process x which uses system C function to start ntpd daemon.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.