CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Ability for moderator or Admin to register a new user in system, using Joomla
Pages: [1]

Author Topic: Ability for moderator or Admin to register a new user in system, using Joomla  (Read 1869 times)

harishojha

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: Joomla 1.5.22
  • MySQL version: 5.0
  • PHP version: PHP5
Ability for moderator or Admin to register a new user in system, using Joomla
April 08, 2011, 05:44:24 am
Hi,

I would like to bring to your kind notice that, we have a project and we want to further enhance it. We want the ability for the Admins or Moderator when they are logged in, to add a new user to the system using the Joomla and CiviCRM tool simultaneously. Right now, what happens is, when a user is not logged in, it takes it to the registration form.


1. If we are logged in and goes to the registration form, then the contact information for the user is not displayed like username and password.I want to ask if there is a way out that if the admins feels the need to add a new user, he just fill in all the details of the registration form which includes username and password and end up signing a new user, with a mail being sent out to the user.

2. I want a way that should ask for the username and password details before he completes the sign up form.

harishojha

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: Joomla 1.5.22
  • MySQL version: 5.0
  • PHP version: PHP5
Re: Ability for moderator or Admin to register a new user in system, using Joomla
April 09, 2011, 04:00:25 am
Hey,

Related to the question I posted yesterday ,I am looking forward to have any information on that.Is there any one who has idea related to the question I posted, as we are trying to explore something and that is urgent also.

Anyone who has any ideas related to this, kindly suggest what can be done in relation to this.

Looking forward for your replies...

Warm Regards,
Harish Ojha

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Ability for moderator or Admin to register a new user in system, using Joomla
April 09, 2011, 07:54:19 am

You will need to customize the code via hooks and templates to do the below. Might want to read the chapter on extending civicrm in the book

http://en.flossmanuals.net/civicrm/ch062_introduction

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

harishojha

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: Joomla 1.5.22
  • MySQL version: 5.0
  • PHP version: PHP5
Re: Ability for moderator or Admin to register a new user in system, using Joomla
April 10, 2011, 10:24:30 pm
Hi Lobo,

I appreciate your support and time.

Please help me with more links for articles, script which give me bit more information about civiCRM code structure, and how can i easily develop a new Hooks which support civiCRM as well as Joomla for registration of new user while moderator or Admin is login. 

Warm Regards,
Harish Ojha

harishojha

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: Joomla 1.5.22
  • MySQL version: 5.0
  • PHP version: PHP5
Re: Ability for moderator or Admin to register a new user in system, using Joomla
April 11, 2011, 07:31:06 am
Hello Lobo,

We have a plan on which we would like to have expert comments from you.

We did some R&D today for registration of a new user, I noticed some of the changes while I was login with admin details from front-end, Here are my findings:-

1) If we take Email as a primary contact field then, Username and Password area is displayed on registration page and after login when we visit the registration page then it tends to get disappeared.(Talking about the area related to, "Please enter a user name to create an account ".)

2) After login when we filled the form again and submitted it,then all the fields value of form were saved in civiCRM table accordingly but Joomla table was not updated.

On the basis of above findings we have made a plan as :-

1) Create registration form with all required fields including username and password and took Email field as work type not primary from admin configuration settings.
2) After submitting the form we update jos_users table using "Hook" file.

I would like to have your expert views and opinions on the following questions like :-

1) Are Joomla and CiviCRM associated with only users email-id or any other field too ?

2) When a person is logged in and submits a form ,then does the old information gets disturbed or is it in any way associated with new information?Based on our research,I didnt found it to get affected.Kindly Suggest.

3)  Would you please provide any other further suggestions on these steps...
 
Looking forward for help and assistance from your end.

Warm Regards,
Harish Ojha

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Ability for moderator or Admin to register a new user in system, using Joomla
April 11, 2011, 07:59:34 am

yes, email-id is the link between a joomla user and a civi contact

if your plan works for you and u'll are happy with it, its good :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

harishojha

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: Joomla 1.5.22
  • MySQL version: 5.0
  • PHP version: PHP5
Re: Ability for moderator or Admin to register a new user in system, using Joomla
April 20, 2011, 04:59:36 am
Hello Lobo,

I followed the procedure as mentioned in our previous conversation. But I would like to have your expert views on the issue we are facing right now.

When we try to Register a new user(I am logged in as Admin) and save the Form, all the data is getting saved in Joomla and CiviCRM as desired.

But we are still facing a issue when trying to update Bridge Table, "civicrm_uf_match" using the Hook function( joomla_civicrm_post ) ,which on saving displays a screen saying " DB Error: already exists " that shows up on the Front end.

Although the user shows up in the admin and the Database but the data doesnt come up in the civicrm_uf_match table.

Can you please provide guidance on why this is happening and help us by providing your valuable suggestions.

Warm Regards,
Harish Ojha

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Ability for moderator or Admin to register a new user in system, using Joomla
April 20, 2011, 07:01:48 am

sorry, no idea. u'll need to debug your code.

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

harishojha

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: Joomla 1.5.22
  • MySQL version: 5.0
  • PHP version: PHP5
Re: Ability for moderator or Admin to register a new user in system, using Joomla
May 10, 2011, 12:43:03 am
Hi Lobo,

Please suggest how can we add a password field in registration form  by using $form->addElement function or any other way ?


Warm Regards,
Harish Ojha

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Ability for moderator or Admin to register a new user in system, using Joomla
May 10, 2011, 12:57:25 am
Quote
how can we add a password field in registration form  by using $form->addElement function
$form->addElement('password','some_password', ts('Some Password'));

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

harishojha

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: Joomla 1.5.22
  • MySQL version: 5.0
  • PHP version: PHP5
Re: Ability for moderator or Admin to register a new user in system, using Joomla
May 10, 2011, 02:57:59 am
Hi Yashodha,

Thanks for your support.

I used script which you suggested but when register form is render then password field is not created.

I used Suggested Script as >>
$form->addElement('password','some_password', ts('Some Password'));

Also i tried with this script >>
$form->addElement('password', 'Password',   $_REQUEST['Password'] ,array("id"=>"Password"));

Warm Regards,
Harish Ojha

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Ability for moderator or Admin to register a new user in system, using Joomla
May 10, 2011, 03:10:54 am
You would also need to render the form element in the template file.
You might wanna check templates/CRM/Admin/Form/Setting/Smtp.tpl for the same
« Last Edit: May 10, 2011, 03:37:25 am by Yashodha Chaku »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

harishojha

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: Joomla 1.5.22
  • MySQL version: 5.0
  • PHP version: PHP5
Re: Ability for moderator or Admin to register a new user in system, using Joomla
May 10, 2011, 05:52:42 am
Hi Yashodha,

As you suggested to change the tmpl file, i explored the same file and it seems that this file is using as a template for mails. Please review and suggest, how can i add password field in this template file also am i checking same file which u suggest ?

File Path:-
administrator/components/com_civicrm/civicrm/templates/CRM/Admin/Form/Setting/Smtp.tpl

I highly appreciate your time and support.


Warm Regards,
Harish Ojha

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Ability for moderator or Admin to register a new user in system, using Joomla
May 10, 2011, 09:53:04 pm
you should check CRM/Admin/Form/Setting/Smtp.php 
Code: [Select]
$this->addElement('password','smtpPassword', ts('SMTP Password'));
and templates/CRM/Admin/Form/Setting/Smtp.tpl
Code: [Select]
<tr class="crm-smtp-form-block-smtpPassword">
                       <td class="label">{$form.smtpPassword.label}</td>
                       <td>{$form.smtpPassword.html}<br />                 
                           <span class="description">{ts}If your SMTP server requires authentication, enter your Username and Password here.{/ts}</span>
                       </td>
                    </tr>

for displaying password field on Settings -> SMTP  form

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Re: Ability for moderator or Admin to register a new user in system, using Joomla
May 14, 2011, 04:13:42 am
You really need to make a Joomla user plugin what loads whenever com_user creates a new user (not just on frontend user create as happens now).  It can call the same profile as you get when a user registers at the front end.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Ability for moderator or Admin to register a new user in system, using Joomla

This forum was archived on 2017-11-26.