How to delete an entry from "My quotes"?
Add Role API?
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > Content Management System > Add Role API? 27 June 2003 19:37:56

  Top users: 
  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:

Add Role API?

Brian Bain 20 June 2003 19:32:53
 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
Add comment
Mikespub 20 June 2003 20:25:42 permanent link ]
 In article <mailman.1038.10561­27000.14415.xaraya_p­ublic-dev-n5IRV0TL0h­wRxVAL8JNkPw@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_addrol­e 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/postn­uke/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.
Add comment
DiamondDogs 20 June 2003 20:33:17 permanent link ]
 "mikespub" <postnuke-J8S6tFQZT­CLk1uMJSBkQmQ@public­.gmane.org> a йcrit dans le message de news:
bcvg9l$hu6$1-111RdW­WlOxkOkXtL6OYfHlSLgV­us2dIk@public.gmane.­org> In article
<mailman.1038.10561­27000.14415.xaraya_p­ublic-dev-n5IRV0TL0h­wRxVAL8JNkPw@public.­gmane.org>, Xaraya
Public Development <xaraya_public-dev-­n5IRV0TL0hwRxVAL8JNk­Pw@public.gmane.org>­ wrote:> >
Have a look at the import8.php script in the /tests directory (or> /tests/import/postn­uke/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
Add comment
Mikespub 20 June 2003 20:50:25 permanent link ]
 In article <bcvgib$je1$1-111Rd­WWlOxkOkXtL6OYfHgC/G­2K4zDHf@public.gmane­.org>, "DiamondDogs" <webmaster@NOSPAMma­nofmusic.com> wrote:>"mikespub" <postnuke-J8S6tFQZT­CLk1uMJSBkQmQ@public­.gmane.org> a йcrit dans le message de news:>bcvg9l$hu6$1-­111RdWWlOxkOkXtL6OYf­HlSLgVus2dIk@public.­gmane.org>> In article><mailman.10­38.1056127000.14415.­xaraya_public-dev-n5­IRV0TL0hwRxVAL8JNkPw­@public.gmane.org>, Xaraya>Public Development <xaraya_public-dev-­n5IRV0TL0hwRxVAL8JNk­Pw@public.gmane.org>­ wrote:>> >
Have a look at the import8.php script in the /tests directory (or>> /tests/import/postn­uke/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 :

$systemConfiguratio­n['Log.LoggerName'] = 'simple';
$systemConfiguratio­n['Log.LoggerArgs'] = array('fileName' =>
'var/logs/log.txt')­;

(make sure your webserver can create that logfile)
and see if you get any errors during the import.

Mike.
Add comment
DiamondDogs 21 June 2003 20:45:07 permanent link ]
 
"mikespub" <postnuke-J8S6tFQZT­CLk1uMJSBkQmQ@public­.gmane.org> a йcrit dans le message de news:
bcvho1$hu6$3-111RdW­WlOxkOkXtL6OYfHlSLgV­us2dIk@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 :>
$systemConfiguratio­n['Log.LoggerName'] = 'simple';> $systemConfiguratio­n['Log.LoggerArgs'] = array('fileName' =>> 'var/logs/log.txt')­;>
(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 30be61ae95528b1de4c­8ce50005790e1 [DEBUG] The following
exception is logged because the XARDBG_EXCEPTIONS flag is set.
Jun 21 13:40:22 30be61ae95528b1de4c­8ce50005790e1 [DEBUG] The validation type
'isset' couldn't be found.

Do i have to post this on bug.xaraya?

Chris
Add comment
Richard Cave 27 June 2003 19:26:18 permanent link ]
 A bit late on this, but...

You can also use the roles/xaradminapi/c­reate 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.

Example (from the authldap module):

$rid = xarModAPIFunc('role­s',
'admin',
'create',
array('uname' => $uname,
'realname' => $realname,
'email' => $email,
'pass' => $pass,
'date' => $now,
'valcode' => 'createdbyldap',
'state' => 3,
'authmodule' => 'authldap'));

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+VMOUVjxirQ­T0dZR+AlfA@public.gm­ane.org> wrote in message
news:mailman.1038.1­056127000.14415.xara­ya_public-dev-n5IRV0­TL0hwRxVAL8JNkP+OyGI­2DFzLe@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?>
Thanks,> Brian>
Add comment
Brian Bain 27 June 2003 19:37:56 permanent link ]
 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/c­reate 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.>
Example (from the authldap module):>
$rid = xarModAPIFunc('role­s',> 'admin',> 'create',> array('uname' => $uname,> 'realname' => $realname,> 'email' => $email,> 'pass' => $pass,> 'date' => $now,> 'valcode' => 'createdbyldap',> 'state' => 3,> 'authmodule' => 'authldap'));>
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+VMOUVjxirQ­T0dZR+AlfA@public.gm­ane.org> wrote in message> news:mailman.1038.1­056127000.14415.xara­ya_public-dev-n5IRV0­TL0hwRxVAL8JNkP61cXZ­9k6wlg@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?>>
Thanks,>> Brian>>
___________________­____________________­________> Xaraya_public-dev mailing list> Xaraya_public-dev-n­5IRV0TL0hwRxVAL8JNkP­w@public.gmane.org> http://lists.xaraya­.com/mailman/listinf­o/xaraya_public-dev
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > Content Management System > Add Role API? 27 June 2003 19:37:56

see also:
mf-layer.xml bundle referencing
SV: SV: Skin Look and Feel
Testing of org.openide.loaders
pass tests:
see also:
How to Crack DRM Video, Rip a DVD, burn…
test
Hello!

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .