• Resolved Wasca

    (@wasca)


    Hi Guys

    Is there a function I can call in my functions.php that will allow me to add a user to a particular group when they login?

    I authenticate my users against our own CRM system and would like to assign each user to particular group when they log in based on some variables they have in their account.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Robin W

    (@robin-w)

    assuming you have some php knowledge, then open

    wp-content/plugins/bbp-style-pack/includes/functions.php

    lines 8-10 contain the hooks for register and login (see the ‘assign groups to roles’ tab in settings for explanation).

    and around line 313 for those functions, which should allow you to create some new hooks to add your own custom code.

    If you need further help, come back.

    • This reply was modified 8 years, 4 months ago by Robin W.
    • This reply was modified 8 years, 4 months ago by Robin W.
    Thread Starter Wasca

    (@wasca)

    Thanks we were able to find the code we needed to do this.

    Plugin Author Robin W

    (@robin-w)

    great – glad you are fixed !

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Programatically Add a User to a Group’ is closed to new replies.