11
fdeconiac
Re: Default affecting group is not working
  • 2011/2/14 13:18

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


I thought about it already...

But i already know that i will have to create other groups next monthes, and will have also to manage their group from registration. I won't be able to manage the user groups manually...

I was hoping to manage it with a specific code with xin code, maybe by a sql request... Xin code developper let me understood it could be possible in an other forum post...

Otherwise, i was thinking to send a code in march and directly affect in a group new user, and do the same inviting next monthes other groups with a new code and changing default group, etc.

Well, this optiono of managing default group is really missing :(

Thanks for your suggestion redheadedrod !

12
fdeconiac
Re: Default affecting group is not working
  • 2011/2/14 21:39

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


redheadedrod,

would you have any idea where default group is set to "2" ?

13
redheadedrod
Re: Default affecting group is not working

No I do not.. But you might be best served looking through the core profile code as it will be less complex and should be easy to step through.

But will still show how it is done...

Assuming the core profile shows the activity streams. I haven't tried on a system without profile to know.

Rodney

14
iHackCode
Re: Default affecting group is not working

the XOOPS_GROUP_USERS constant is defined in mainfile.php

register.php also uses it to insert new user to the database
http://dev.xoofoo.org/xoopsphpxref/250/nav.html?register.php.source.html#l145
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

15
fdeconiac
Re: Default affecting group is not working
  • 2011/2/15 11:42

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Thank you so much iHackCode !!!! I was looking for so long time :)

So i found this in mainfile.dist.php :

70 define("XOOPS_GROUP_ADMIN", "1");
71 define("XOOPS_GROUP_USERS", "2");
72 define("XOOPS_GROUP_ANONYMOUS", "3");

So i will change group_users by "13". Do you know if this change could impact something else, or just the affecting group for the registration ? Just to know if i'm going to crash my site :)

16
redheadedrod
Re: Default affecting group is not working

You really should add a define to that...

define("XOOPS_GROUP_DEFAULT", "13");

Then look for any instance of XOOPS_GROUP_USERS until you find the correct one and then replace this with the above line. That will keep this in tact for not only profile but any other program that uses these defaults.

Rodney

17
fdeconiac
Re: Default affecting group is not working
  • 2011/2/15 13:19

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Just tried by replacing it directly and its works ! it make me so happy :)

Thanks for your advice redheadedrod! I will try to modify it properly by adding a new define... and i imagine it could be called from register page...

Will have a look to it tonight ;)

18
fdeconiac
Re: Default affecting group is not working
  • 2011/2/15 20:12

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Just tried to modify

=> mainfile.php :
// Secure file     require XOOPS_VAR_PATH . '/data/secure.php';      define('XOOPS_GROUP_ADMIN', '1');     define('XOOPS_GROUP_DEFAULT', '13');     define('XOOPS_GROUP_USERS', '2');     define('XOOPS_GROUP_ANONYMOUS', '3');


=> register.php :
$newid $newuser->getVar('uid');             if (!$member_handler->addUserToGroup(XOOPS_GROUP_DEFAULT$newid)) {                 echo _US_REGISTERNG;                 include $GLOBALS['xoops']->path('footer.php');                 exit();             }


Didn' t work anymore... So i will modify as i did before, just by changing the id of XOOPS_GROUP_USERS

Hope this point could be managed in admin in the next xoops versions... even depending on some criteria as a specific code (xin code ?)

Thanks all for your help,

Regards

19
iHackCode
Re: Default affecting group is not working

it could also be that you are using the profile module for your registration and not the register.php file.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

20
fdeconiac
Re: Default affecting group is not working
  • 2011/2/16 7:19

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


yes you're right !

So i imagine i should look for "XOOPS_USER_GROUP" in modules/profile/register.php ?

Will try by the day :)

Login

Who's Online

455 user(s) are online (324 user(s) are browsing Support Forums)


Members: 0


Guests: 455


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits