I got bit concerned when I started digging into the Roles module just now.
I need the ability to add a batch of users (say for the initial set up of an intranet site), the Roles modules currently adds the role via the roles_admin_addrole function which requires a proper authkey and fetches its input from xarVarFetch. This set up does not easily allow other methods of user creation.
I did notice it then creates a xarRoles object and uses that object's methods to create the new role. Should I instead be looking at using this object for creating users? If so, would I have to duplicate all the security checks that occur prior to the use of this object?
In article <mailman.1038.1056127000.14415.xaraya_public-dev-n5IRV0TL0hwRxVAL8JNkPw@public.gmane.org>, Xaraya Public Development <xaraya_public-dev@lists.xaraya.com> wrote:>I got bit concerned when I started digging into the Roles module just now.>
I need the ability to add a batch of users (say for the initial set up of >an intranet site), the Roles modules currently adds the role via the >roles_admin_addrole function which requires a proper authkey and fetches >its input from xarVarFetch. This set up does not easily allow other >methods of user creation.>
I did notice it then creates a xarRoles object and uses that object's >methods to create the new role. Should I instead be looking at using this >object for creating users? If so, would I have to duplicate all the >security checks that occur prior to the use of this object?>
Thanks,>Brian>
Have a look at the import8.php script in the /tests directory (or /tests/import/postnuke/import_pn.php as it's now called).
That's one example on how to create a few 10.000s of users in batch.
Another can be found in the import_phpbb.php script. Feel free to add other import scripts if you have them
"mikespub" <postnuke-J8S6tFQZTCLk1uMJSBkQmQ@public.gmane.org> a йcrit dans le message de news: bcvg9l$hu6$1-111RdWWlOxkOkXtL6OYfHlSLgVus2dIk@public.gmane.org> In article <mailman.1038.1056127000.14415.xaraya_public-dev-n5IRV0TL0hwRxVAL8JNkPw@public.gmane.org>, Xaraya Public Development <xaraya_public-dev-n5IRV0TL0hwRxVAL8JNkPw@public.gmane.org> wrote:> >
Have a look at the import8.php script in the /tests directory (or> /tests/import/postnuke/import_pn.php as it's now called).>
That's one example on how to create a few 10.000s of users in batch.>
Another can be found in the import_phpbb.php script. Feel free> to add other import scripts if you have them >
Mike.
Mike, I've tested today the new import_pn.php, without any error i've a blank page... I've used then the import8, with some errors again as i've said in my mail... Chris
In article <bcvgib$je1$1-111RdWWlOxkOkXtL6OYfHgC/G2K4zDHf@public.gmane.org>, "DiamondDogs" <webmaster@NOSPAMmanofmusic.com> wrote:>"mikespub" <postnuke-J8S6tFQZTCLk1uMJSBkQmQ@public.gmane.org> a йcrit dans le message de news:>bcvg9l$hu6$1-111RdWWlOxkOkXtL6OYfHlSLgVus2dIk@public.gmane.org>> In article><mailman.1038.1056127000.14415.xaraya_public-dev-n5IRV0TL0hwRxVAL8JNkPw@public.gmane.org>, Xaraya>Public Development <xaraya_public-dev-n5IRV0TL0hwRxVAL8JNkPw@public.gmane.org> wrote:>> >
Have a look at the import8.php script in the /tests directory (or>> /tests/import/postnuke/import_pn.php as it's now called).>>
That's one example on how to create a few 10.000s of users in batch.>>
Another can be found in the import_phpbb.php script. Feel free>> to add other import scripts if you have them >>
Mike.>
Mike,>I've tested today the new import_pn.php, without any error i've a blank>page...>I've used then the import8, with some errors again as i've said in my>mail...>Chris>
Probably some exception that's not treated properly, and that has unexpected side-effects. Try enabling logging by changing your config.system.php file like this :
"mikespub" <postnuke-J8S6tFQZTCLk1uMJSBkQmQ@public.gmane.org> a йcrit dans le message de news: bcvho1$hu6$3-111RdWWlOxkOkXtL6OYfHlSLgVus2dIk@public.gmane.org> >
Mike,> >I've tested today the new import_pn.php, without any error i've a blank> >page...> >I've used then the import8, with some errors again as i've said in my> >mail...> >Chris> >
Probably some exception that's not treated properly, and that has> unexpected side-effects. Try enabling logging by changing your> config.system.php file like this :>
(make sure your webserver can create that logfile)> and see if you get any errors during the import.>
Mike.
Results are : Jun 21 13:40:22 30be61ae95528b1de4c8ce50005790e1 [DEBUG] The following exception is logged because the XARDBG_EXCEPTIONS flag is set. Jun 21 13:40:22 30be61ae95528b1de4c8ce50005790e1 [DEBUG] The validation type 'isset' couldn't be found.
You can also use the roles/xaradminapi/create function to create a new role. The authldap module uses this function to create a new role based on the information returned from searching LDAP.
As an aside, you should always try to use a modules API and not circumvent a modules API by calling a xaradmin or xaruser function directly.
Cheers Rich
"Brian Bain" <tefen-y+VMOUVjxirQT0dZR+AlfA@public.gmane.org> wrote in message news:mailman.1038.1056127000.14415.xaraya_public-dev-n5IRV0TL0hwRxVAL8JNkP+OyGI2DFzLe@public.gmane.org> I got bit concerned when I started digging into the Roles module just now.>
I need the ability to add a batch of users (say for the initial set up of> an intranet site), the Roles modules currently adds the role via the> roles_admin_addrole function which requires a proper authkey and fetches> its input from xarVarFetch. This set up does not easily allow other> methods of user creation.>
I did notice it then creates a xarRoles object and uses that object's> methods to create the new role. Should I instead be looking at using this> object for creating users? If so, would I have to duplicate all the> security checks that occur prior to the use of this object?>
Thank you. For some reason, when I was looking for the proper variable to pass to the API I didn't see the create.php file in the xaradminapi folder. So I went back to the xaradmin in an attempt to figure out what it used, which is when I discovered the roles object.
I've since built myself a little import script which loads in users based on my company's email list. It's not perfect, but it will do for the time being.
A bit late on this, but...>
You can also use the roles/xaradminapi/create function to create a new> role. The authldap module uses this function to create a new role based> on the information returned from searching LDAP.>
As an aside, you should always try to use a modules API and not> circumvent a modules API by calling a xaradmin or xaruser function> directly.>
Cheers> Rich>
"Brian Bain" <tefen-y+VMOUVjxirQT0dZR+AlfA@public.gmane.org> wrote in message> news:mailman.1038.1056127000.14415.xaraya_public-dev-n5IRV0TL0hwRxVAL8JNkP61cXZ9k6wlg@public.gmane.org.>> I got bit concerned when I started digging into the Roles module just>> now.>>
I need the ability to add a batch of users (say for the initial set up>> of an intranet site), the Roles modules currently adds the role via>> the roles_admin_addrole function which requires a proper authkey and>> fetches its input from xarVarFetch. This set up does not easily allow>> other methods of user creation.>>
I did notice it then creates a xarRoles object and uses that object's>> methods to create the new role. Should I instead be looking at using>> this object for creating users? If so, would I have to duplicate all>> the security checks that occur prior to the use of this object?>>
If you would like to report an abuse of our service, such as a spam message, please . Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .