Posted by fizk on March 30, 2010 at 5:43am
4 followers
| Project: | XMPP Framework |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I've some important bug fixes and slight improvements to XMPPFramework.
I want to use this space to post my "massive" patch, and discuss with others.
Comments
#1
How to apply the patch
You need to update the xmpp_client module from 6.x-2.x-dev.
patch -i NAME_OF_PATCH_FILE -p1#2
Hey,
great work! Thank you very much for applying this patch! Maybe you should say that you can sync users between drupal and your xmpp server without using a ldap server if you apply the patch.
I recognized that you have to search and replace in the patchfile these lines:
xmppframework-orig/ to xmppframework/
and
xmppframework-mod/ to xmppframework/
to get the right filestructure ;). After that you can use the patch command... Also there seems to be an error if you want to register a user from the backend: warning: Invalid argument supplied for foreach() in /drupal/sites/all/modules/xmppframework/contrib/xmpp_api/vendor/XMPPHP/XMPP.php on line 661.
King regards!
#3
Hey after taking a deeper look at this i have just some ideas :)
- Is it possible to sync users during the cronjob of drupal? So existing or deleted users are added/deleted in both databases?
-if not there could be erros if in xmpp already is an username which is used during the drupal registration
-the next "bug" is that if i delete a user in drupal it is not deleted in the xmpp database?!
- If the e-mail field is given during the drupal registration it should be also added to xmpp (If I understand this right I think this should be easy done in line 660 ff (xmpp.php) or?)
And the last thing is, that it would be great if this module could be the only one which can register user. In openfire for example the registration can be closed for public clients so the registration is only available through a webinterface (and in this case for drupal too). This would be very usefull becauce with drupal you could validate the given mailadress the user registerd with.
Other Clients like pidgin etc. should only be able to connect to the server..
I dont assume that anybody or you will add these features but I wanted to share my ideas because this is the only way to enhace the development :).
Altogether the fixes from fizk are very very usefull because they replace the use of the ldap server which maybe opens new security issues and from my opinion the ldap is not really needed for user sync...
best regards!
#4
subscribe
#5
I'll look into this. I changed the patch last minute to use {$this->server} instead of hardcoding my server's domain name, that might be why.
#6
It's definitely possible, requires some coding.
With the patch, users can always change their XMPP password via /user//edit. My assumption is that if there's a Drupal user "test222" at example.com, then he also fully owns the corresponding XMPP account "test222@example.com".
That'd be a nice feature to have, if the administrator enables it. I think this is more of a feature request than a bug.
It's definitely possible, requires some coding.
This is already possible, to have this kind of functionality, just disable new user registrations.
XMPPFramework via XMPP_API requires that you provide an account with administrative privileges on the XMPP server. As long as that account is allowed to create/delete users and create/delete chat rooms, you're set.
#7
Hi fizk,
thanks for your response. Today I have to go work again so I cant take a look at the small bug at line 661. Maybe I'm able to do this in the evening :) but all in all I think also that the code is best known for you...
What I dont understand, ist the thing with the registration. If I disable the public registration at openfire also drupal say me that it is not able to connect to the server. I know the thing with the admin user in the xmpp_api and everything is also working fine till i change to non public registration.
this is my config in xxmpp_api:
server: domain.de
port: 5222
admin jid: adminuser
pw: xxx
adminjidserver: domain.de
KUDOS ;) and best regards!
#8
for me this patch fixed the problem I spent on all night: http://drupal.org/node/588502
#9
@ZyanKlee: I think that fix is actually integrated in the fix mentioned above. I can't find a difference between yours and that from post1 here...