• Welcome to Simple Machines Community Forum. Please login or sign up.

com_smf_registration & aro+acl data

Started by dcabbar, August 15, 2005, 12:36:28 AM

Previous topic - Next topic

dcabbar

Hi,

I was looking at the com_smf_registration code, and saw couple of lines in saveRegistration method for creating ACL info in mos_aro* tables.

The thing I don't understand here is, mosUser->store method already takes care of this, why do you need to replicate the whole thing in a manual, hence less consistent way.

My dilemma here is, I want every new user registration to be defaulted to Author instead of Registered. Hence, when I change com_smf_registration line:

   $row->gid = $acl->get_group_id('Registered','ARO');

to

   $row->gid = $acl->get_group_id('Author','ARO');


the whole thing gets messed up because, mambo's mosUser->store creates a row in the acl tables as Author, and com_smf_registration creates yet another as Registered (because type is hardcoded to 18 there).

And the whole thing messes up.

Anyways, any idea/reason why this was replicated there?

Thanks...

tentronik

Just a guess but cant you use the member registration settings and put a primary membergroup called Authors?

Orstio

QuoteThe thing I don't understand here is, mosUser->store method already takes care of this, why do you need to replicate the whole thing in a manual, hence less consistent way.

I was finding that mosUser->store was not always working as it should.  It was sometimes missing entering new users into the ACL.  Then there would be multiple database errors when the user tried to login.  So, I put in the klunky code, just to make sure that it works every time.

Quotethe whole thing gets messed up because, mambo's mosUser->store creates a row in the acl tables as Author, and com_smf_registration creates yet another as Registered (because type is hardcoded to 18 there).

The value for author is 21, yes?  Just change it to that.

Advertisement: