Home Software Joomla CiviUser, another explanation
CiviUser, another explanation PDF Print E-mail
Software - Joomla
This is a further explanation of the thinking behind com_civiuser in response to a question from a user.

com_civiuser (together with mod_civilogin) has the same functionality as the standard com_user which handles the front-end user view of login, logout, forgot password, forgot username, and create an account.

The only bit that is changed is the 'create an account' form which in the com_civiuser version only allows someone to create a joomla user account if there is a matching CiviCRM contact record, and optionally if they are also a member of any one of a list of CiviCRM groups.

It also creates the relevant record in the database to link together the new joomla user account and the CiviCRM contact.

So it is solely about restricting who can create new Joomla accounts on your system. The intention is (my application) that you have an entire membership database already existing in CiviCRM. In my case CiviCRM contacts also include non-members, members are all flagged as belonging to a group called 'AllMembers' which happens to have a group id of '2'. So in the parameters for com_civiuser I set the required group to be 2 and then non-members cannot create an account even if they have a contact record in CiviCRM.
Then I tell members that if they want to access the members only website they can simply go and create an account - pick a username and password and validate their email address without any need for admin intervention or approval.
They always have to validate their email address as a security measure.

Incidentally the match is on Firstname AND Lastname AND email - all three have to match. This can cause problems if Ali Smith is in your CiviCRM database as Alison Smith because it will tell her she is not a member - you can set a nicer message in the parameters.

So to use it I install com_civiuser and mod_civilogin and disable the existing mod-login module (which has a built in link to the 'create an account' function in com_user). You can't uninstall com_user as it is part of core Joomla so you simply replace any menu links you have to it with links to the equivalent functions in com_civiuser and also in the Config-System section in the backend you disable user registration (this is the interface to com_users). This will prevent anyone bypassing the checks by accessing com_user directly; com_civiuser does not check the 'allow user registration' flag so they can use that instead.

At the moment there is no administrator user management - you still have to do this through the standard com_users (with an 's') admin component - the 'Users' section in the Joomla admin backend.

There are some outstanding issues to be wrapped up shortly:
  • if you delete a Joomla user in the standard user management backend then the corresponding entry in the CiviCRM link table is not deleted. This contains the email address which has to be unique in that table, so you have to go and manually delete the entry (eg using phpMyAdmin to delete the entry in civicrm_uf_match table) or that email address can never be registered again. I hope to add a feature to the com_civiuser backend to allow a user to be deleted cleanly.
  • if the user's email address is changed in either Joomla or the CiviCRM contact record, the change is not propogated into the other side. Next version of com_civiuser should fix this if changing the Joomla user email on the front end but the other direction is a core CiviCRM issue.
  • if a CiviCRM contact is deleted then the corresponding Joomla user record is not always deleted - again a core CiviCRM problem, and I'm not sure that one would want it to be, but it can leave valid user accounts that are no longer members (best solution is not to delete them but simply flag then as non-members and use Henry Bennett's Joomla authentication plugin for CiviCRM which checks their membership every time they login).
  • com_civiuser does not yet use the CiviMember method for checking valid membership. I am not using CiviMember at this time and so the use of an 'All Members' group was a simple solution. It should be a fairly simple thing to add in a future version.
  • I'd also like to add a backend admin tool to create a Joomla account for any contact and create the match record. At the moment there is only the standard CiviCRM tool to create matching records for all Joomla users which may not be what one wants.
  • I also have in mind to specify CiviCRM groups who would automatically be given author, or publisher, or manager rights in Joomla. So I could create a CiviCRM group of contacts who I wanted to be able to add articles on the website and then when they created an account the would automatically get the right Joomla access level.

In summary com_civiuser iis just about ensuring that only people who have valid CiviCRM contacts can create Joomla user accounts.
How you setup and use the CiviCRM groups is up to you.

Regards
RogerCO