1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Changing default group assignments

Discussion in 'Code Modifications [Archive]' started by Jake Bunce, May 31, 2011.

  1. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    (per this post)

    When people want to change the destination group for new users I always advise them to simply treat the Registered group as if it were the new group. Set appropriate permissions for Registered just as you would the new group.

    FYI, the default groups are hard coded into this file:


    	public static $defaultGuestGroupId = 1;
    	public static $defaultRegisteredGroupId = 2;
    	public static $defaultAdminGroupId = 3;
    	public static $defaultModeratorGroupId = 4;
    (and fair warning per this post)

    You should respect the roles of the default groups. They are hard-coded and changing them will cause problems in the future (at the very least, having to remodify the files after every upgrade).
    Ranger375 likes this.
  2. ragtek

    ragtek Guest

    You could change the groupIds without file editing.

    event init_dependencies
    XenFOro_Model_User::$defaultGuestGroupId = ..;
    XenFOro_Model_User::$defaultAdminGroupId= ..;
    Jake Bunce likes this.
  3. Kainzo

    Kainzo Active Member

    What exactly does this mean?

Share This Page