FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » FUDforum in eGroupWare » Problems With Automatic User Import
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon5.gif  Problems With Automatic User Import [message #23588] Wed, 23 March 2005 17:20 Go to next message
sonnyka is currently offline  sonnyka   Germany
Messages: 6
Registered: March 2005
Karma: 0
Junior Member
Hi,

I've problems with the automatic user import from egroupware to fudforum. I use LDAP authentification for egroupware users, all account information (egroupware & fudforum) is stored then in a mySQL db.

First I noticed that new egroupware users (authenticated via LDAP) were not added to the fudforum account table (phpgw_fud_users) - so I added some of them manually. Realizing that this will be a little too much work, I removed the fudforum completely from egroupware (via the groupware setup pages). All tables were dropped correctly. Then I re-installed fudforum again - having the same problem PLUS all existing egroupware user accounts are not re-registered in fudforum as well ...

Any ideas?

BTW: I use the current debian testing versions (v1.00.000- something)

Thanks!
Re: Problems With Automatic User Import [message #23589 is a reply to message #23588] Wed, 23 March 2005 17:22 Go to previous messageGo to next message
sonnyka is currently offline  sonnyka   Germany
Messages: 6
Registered: March 2005
Karma: 0
Junior Member
Oh, one more thing:

In the very beginning the first several users were automatically added correctly to fudforum when first registered in egroupware via LDAP - dunno when and how this changed ...
icon3.gif  Re: Problems With Automatic User Import [message #23597 is a reply to message #23588] Wed, 23 March 2005 20:36 Go to previous messageGo to next message
sonnyka is currently offline  sonnyka   Germany
Messages: 6
Registered: March 2005
Karma: 0
Junior Member
Found the problem:
Some hooks got lost somehow - would be interested to find out how as I did not change anything with that. I reattached them and the forum is fine again.
Re: Problems With Automatic User Import [message #23598 is a reply to message #23597] Wed, 23 March 2005 20:41 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Thanks for the update, I'd be very interested in your analysis regarding how the hooks "got lost".

FUDforum Core Developer
Re: Problems With Automatic User Import [message #23631 is a reply to message #23598] Thu, 24 March 2005 16:12 Go to previous messageGo to next message
sonnyka is currently offline  sonnyka   Germany
Messages: 6
Registered: March 2005
Karma: 0
Junior Member
Things are becoming strange:
Same problem reappeared. I tried to re-register all hooks - this time no effect. Looking up the hooks in the table phpgw_hooks shows me:

697 fudforum preferences hook_preferences.inc.php
696 fudforum admin hook_admin.inc.php
695 fudforum sidebox_menu fudforum.fud_sidebox_hooks.all_hooks
694 fudforum edit_user fudforum.ufud.chg_settings
693 fudforum deleteaccount fudforum.ufud.del_account
692 fudforum addaccount fudforum.ufud.add_account

Tracing all mysql activities I found that an INSERT on the pgpgw_fud_users table does not take place (neither when a new egw user logs in nor when he/she first tries to access fudforum).

Doing a little more analysing: I checked fudforum/inc/class.ufud.inc.php - seems correct to me. But as well I am pretty sure the add_account function gets not called.

When and how should this take place? Who calls this function?
Any other ideas?

Thanks!
Re: Problems With Automatic User Import [message #23637 is a reply to message #23588] Thu, 24 March 2005 18:47 Go to previous messageGo to next message
sonnyka is currently offline  sonnyka   Germany
Messages: 6
Registered: March 2005
Karma: 0
Junior Member
Ok, some more news:

egw := egroupware

If I install fudforum in egroupware again (set it up via http://.../egroupware/setup/) all CURRENT users in egw are transported correctly from the table phpgw_accounts to phpgw_fud_users.

If a NEW user logs in the first time in egw (identified via LDAP - but has as this time NO egw account) the egw account is set up correctly, but NO phpgw_fud_users entry is created. If such a user then tries to access fudforum a complete white HTTP page is loaded.

Questions:
* When and how should such accounts be created in fudforum?
* Where are the corresponding functions?
* Any ideas what goes wrong?
Re: Problems With Automatic User Import [message #23667 is a reply to message #23637] Fri, 25 March 2005 19:33 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
When a new user is added to eGW, it should call the hooks from all aplications that need to do something for this even. This of course should include the FUDforum's user creation hook.

The forum's hooks can be found inside fudforum/setup/inc directory.


FUDforum Core Developer
Re: Problems With Automatic User Import [message #23776 is a reply to message #23667] Mon, 28 March 2005 19:12 Go to previous messageGo to next message
sonnyka is currently offline  sonnyka   Germany
Messages: 6
Registered: March 2005
Karma: 0
Junior Member
I added an "print 'hello';" to the fudforum/inc/class.ufud.inc.php file (function add_account()) - this text is not printed when a new user first logs in in eGW, so I conclude the function does not get called.

Hooks seems to be registered correctly (see mysql printout above).

So what goes wrong?
Re: Problems With Automatic User Import [message #26108 is a reply to message #23776] Tue, 05 July 2005 09:01 Go to previous messageGo to next message
yuvallb is currently offline  yuvallb   Israel
Messages: 2
Registered: July 2005
Karma: 0
Junior Member
I had the EXACT same problem,
my solutions was:

edit phpgwapi/inc/class.accounts_sql.inc.php
and phpgwapi/inc/class.accounts_ldap.inc.php
and add the line:
$GLOBALS['phpgw']->applications->read_installed_apps();

before:
$GLOBALS['phpgw']->hooks->process($GLOBALS['hook_values']+array(...

The problem was that when an ldap user is logging in the first time to egroupware,
the new account procces does not get the list of applications before calling the addaccount hook.
the hook then will do nothing (he sees no apps installed...)

hope this helps!!

[Updated on: Tue, 05 July 2005 09:58]

Report message to a moderator

Re: Problems With Automatic User Import [message #26114 is a reply to message #26108] Tue, 05 July 2005 13:09 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Wow thanks for that bit of information, could you please notify the eGW ldap developers about this. It sounds like there is a bug in the hook callback code.

FUDforum Core Developer
Re: Problems With Automatic User Import [message #26476 is a reply to message #26108] Fri, 22 July 2005 08:40 Go to previous messageGo to next message
gandhiano is currently offline  gandhiano   Spain
Messages: 1
Registered: July 2005
Location: Almada, Portugal
Karma: 0
Junior Member
In my case this didn't solve the problem. New users in eGW still don't get an account on FUDforum.

I am using 1.0.0.08, but in previous versions (not sure whether 06 or 07) this didn't happen and everything worked properly. I am suspecting that even with the read_installed_apps() this doesn't work, because the forum administration has simply disappeared, which makes me suspect that the application might not be recognized as being installed.

I am therefore willing to reinstall it and see what happens. Does anyone know if tables are dropped (and the forums lost) when I remove the forum?
Re: Problems With Automatic User Import [message #26479 is a reply to message #26476] Fri, 22 July 2005 10:16 Go to previous message
yuvallb is currently offline  yuvallb   Israel
Messages: 2
Registered: July 2005
Karma: 0
Junior Member
I can tell you that I had a VERY hard time reinstalling fudforum.
eventualy, I had to reinstall ALL of eGroupWare...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: quoted previous messages
Next Topic: Url links don't work
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 10:12:59 GMT 2024

Total time taken to generate the page: 0.02821 seconds