Recent Topics

1 Jun 02, 2007 19:36    

Sorry for bumping this age-old topic.

I am well aware that the session/login could be hooked using the AlternateAuthentication and checking if the current user/client has the Joomla Credentials/Signatures/Cookies/Biscuits so that won't be a problem.

The (probable) issue is the user management: is there a way for me to add/remove Users without hacking through the database structure of b2evolution? Moreover, if I happen to find that api and add users, would plugins which gets hooked to AfterUserInsert/AfterUserDelete? (plugins hooked to AfterUserRegistration/AppendUserRegistrTransact shouldn't get called... do AfterUserRegistration/AppendUserRegistrTransact get called when users are added via the administration panel?)

P.S. The topic is on Session Variables but it got turned to a Joomla Integration Discussion.. meh..

2 Jun 02, 2007 19:03

If you pick a subject I'll split this post off into it's own thread ;)

You can create your own users using something like :-

$fred = & new User();
$fred->set( 'login', 'login' );
$fred->set( 'password', 'summat really convoluted' );
.... etc ......
$fred->dbinsert();

this will trigger AfterUserInsert(); take a look through inc/model/users/_user.class.php for all the funky stuff you can set ;)

God knows what gets called in the admin bit without looking through the code, if you can't find it give me a shout.

¥

3 Jun 02, 2007 19:29

Thanks for the information.

I forgot to add in my previous post that it should be accessible outside of b2evo (i.e. from the administration interface of Joomla). So, in that case, what should I include? From diggin up the sourcode, I think the wollowing should be included at the very least:
/conf/_config.php
/inc/_main.inc.php
inc/model/users/_user.class.php

or am I missing something else?
Anyway, I'll test this tomorow.. or rather today (it's 1:30am here... need to get my rest)

4 Jun 02, 2007 19:34

Totally off the top of my head, you should get away with adding /conf/_config.php & inc/_main.inc.php ( *fairly* sure it loads User class ..... but don't quote me, it's been a long day ;) )

Between them they *should* load db / groups / user, which is all you should need ( and loads of extra stuff you don't need )

¥


Form is loading...