Forums

how to login

shivananda 25 Jul, 2007
Hi

I have created a registration page using Chronoforms in joomla.Successfully it is working.I am able add records by registring in the form.
Now i have Remove the joomla registration form and kept my chrono Registration page.But when i login the user name and password which are registered in chrono reg.page ,I unable to login.
I know it is not possible and i have to change the connection string.But i dont know how to do it.

Joomla Professionals please help me.

Thanks in advance.

Shiva:(<br><br>Post edited by: shivananda, at: 2007/07/25 10:56
GreyHead 25 Jul, 2007
Hi shivananda,

This is tricky stuff and I've never tried to do it.

What you need to simulate in your new form is the processing in the saveRegistration() function in com_registration/registration.php I'd guess that you will either need to call this function or emulate most of its code to get all the info stored in the correct database tables.

Bob<br><br>Post edited by: GreyHead, at: 2007/07/25 13:27
shivananda 25 Jul, 2007
Hi Grey,

Thanks for your reply.Grey can You explain it in detail please.Where to call the save registration() function in the form.As I have written all the code in html .

Thanks .
GreyHead 25 Jul, 2007
Hi shivananda,

This is quite a complicated piece of development as it interacts with some of the Joomla core code (it's usually easy to read data from Joomla, much harder to write it and get it all correct).

If you want to post your form here - or e-mail it to me at info at greyhead.net then I'll have a look at it. But no promises or guarantees.

Bob
shivananda 25 Jul, 2007
Grey,

My form is some what large .So i have send that form thru mail.Will U please check it down.

Thank U ,
Shiva.
shivananda 25 Jul, 2007
Hello Grey ,


I have send my form to your mail account.

Please can u look over that.

Thank U

shiva<br><br>Post edited by: shivananda, at: 2007/07/25 14:22
shivananda 25 Jul, 2007
Here is the file [file name=registration.txt size=39291]http://www.chronoengine.com/components/com_fireboard/uploaded/files/registration.txt[/file]
Max_admin 25 Jul, 2007
Shivananda, can I look at the PHP code you use to insert new users into database ?

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 25 Jul, 2007
Hi Shivananda,

Sorry, I've been busy this afternoon. I've had a quick look at your form and I think that you are trying to do too much with one form.

I suggest that you have them register using the standard Joomla registration module and, once they are registered, pass them to a ChronoForms form with all the extra information you require.

That way you keep your form a bit more protected (and spam free) and you avoid the complex task of registering and collecting data on the same form.

Bob
shivananda 26 Jul, 2007
Grey,

Thank U.

I am having one more doubt.If i registered in the form which i have created with the help of chronoforms .It is successfully adding the data into the database.

Now when i try to view the register persons from the admin side by clicking "showdata" Button it is showing in the form of records,(ex:record1,record2...etc) you may know that.

Can i show them with the usernames rather than records.

OR
can i show the usernames(who are registered with my chrono forms) in the usermanager of joomla admin.

Can u tell me if there is any logic.

Thanks

Shiva.
GreyHead 26 Jul, 2007
Hi Shiva,

I think that there are two different things happening that are quite separate.

I suggest that you have people register and log on using the standard Joomla modules. This works well and is very simple.

When they have registered then you can have them fill in your ChronoForms forms. Provided that they are logged on then you can easily pick up their name and email using $my. For example
<?php 
global $my;
echo "name: $my->name <br />
email: $my->email <br />
id: $my->id";
?>


Bob
shivananda 27 Jul, 2007
Grey
Again i got one doubt.
I have written a sql INSERT statement for inserting username password,email etc under auto generate tab .
the query seems to b correct.it is not executing. But when i remove default code (which is generated by creating an table in the when form is created ).the statement is executed and data is stored into the database successfully.

My The code looks like this

$database->setQuery( "INSERT INTO #__users(name,username,email,password,usertype,gid,registerDate) VALUES ( '".$_POST['firstname']."' , '".$_POST['lastname']."' ,'".$_POST['email0']."','".$_POST['password']."','Registered','18','". date('Y-m-d')."')");


one more thing Grey

when i want to view the form data
It is showing in the form of records.Can i show it in the form of username.
Max_admin 27 Jul, 2007
Hi Shiva,

while we are waiting for bob's response I have some comments for you :

#1- you cant save password in the jos_users table in clear text, you will need to put : md5($_POST['password']) instead or it wont work when u try to login.

beside this there is 2 other tables where you will need to add users too, check the jos_core_acl_groups_aro and jos_core_acl_aro

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 27 Jul, 2007
Hi Shiva,

Don't try to do this!!!!

First, have your users register using the usual Joomla module/form.

Then, show them your form to get more information.

Joomla does some work behind the scenes when people register to verify the data and put it into the correct place. It is much safer not to try to copy all of that.

Bob
shivananda 27 Jul, 2007
Bob

what is the answer for my seconnd Question about diplaying usernames instead of record1,record2,......
GreyHead 27 Jul, 2007
Hi Shiva,

Sorry, missed that bit. At present you can get info by record number from ChronoForms, but you can write your own page to read the database and present it in any order you like.

To sort by user name the 'correct' way is to store the user-id in your table, then use a MySQL JOIN to get data from both your table and the user table and create your own output.

Bob
This topic is locked and no more replies can be posted.