[Solved +instructions on how to] Convert all SMF users to joomla users?

Started by Bugman, January 16, 2006, 10:19:36 AM

Previous topic - Next topic

Bugman

Hello

I need to physically put all SMF users into the joomla database.

Anyone know how?

J

Kindred

SMF Users are automatically ported over into joomla the first time they log in using the bridge login module.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Bugman

Hello,

No that fails.

I will stop posting in all these threads and keep it to one

Apologies for triple posting. Please lock this thread

Bugman

Orstio

Since this is the only topic that you started yourself for help with your site, I'll respond to it instead of locking it.

QuoteSMF Users are automatically ported over into joomla the first time they log in using the bridge login module.

QuoteNo that fails.

Version of SMF?

Version of bridge?

URL?

Bugman

Hi,

Bridge: 3.20
SMF: RC2
Joomla: 1.0.7

After deleteing everyone, and putting back in the admin and then starting it off again, it works!

Thankyou for your patience!

I do have one more problem though, when using the trick to convert users into another user group, using this code:

mosMakeHtmlSafe($row);

   $row->id = 0;
   $row->usertype = '';
   $row->gid = $acl->get_group_id('Registered','ARO');

   if ($mosConfig_useractivation=="1") {
      $row->activation = md5( mosMakePassword() );
      $row->block = "1";

Changing Registered to Author fails to give the user a usertype in the database. Any ideas?

Bugman

Orstio

Since the bridge doesn't use the default Joomla registration, that code hack will be useless.

Are you using bridge registration, or SMF registration?

Bugman

The bridged version

The above edited file was the com_SMF_registeration one so I thought it might do.

Any ideas how I can make them all authors when the log in?

Ta

Bugman

Orstio

Are Authors group 19, or 21?

You'll want to find queries in that file that have the number '18' in them, and change them to the appropriate group id number for Authors.

Bugman

Authors are group 19

Just done that, and that doesn't work. Still comes up as being registered

Bugman

Orstio

You do realize that it won't convert existing users, right?  Only new registrations....

Bugman

Oh  i see, no i want to convert existing users in SMF into the joomla database as authors! :-( I thought the hack made them into something else as they convert over to joomla userbase

If it helps, so far, after doing a few database dumps, the only lines which change after I have made them an author in the backend is:


Old ->  INSERT INTO jos_core_acl_groups_aro_map VALUES (18, '', 13);
New ->INSERT INTO jos_core_acl_groups_aro_map VALUES (19, '', 13);

And in the jos_users at the end of the users insert

Old -> '', 0, 0, 18, '0000-00-00 00:00:00', '2006-01-17 07:14:26', '', '');
New -> 'Author', 0, 0, 19, '0000-00-00 00:00:00', '2006-01-17 07:14:26', '', 'editor=');


So obviously there is still some "18" numbers lying about, but where, there are none left in smf_registeration. Also how do I get that "author" to be inserted. Does the editor bit at the end matter too?

Thank you

Bugman

Bugman

It would seem the 18s are coming from smf.php, so ok, i can edit thoose, but still, It wont show author in usertype.

Bugman

Bugman

Hello,

After a bit of hassle, i have figured it out, and included instructions on how to do this.

Note, this was done using RC2, 1.0.7 and 3.20

This is to make all users, as they login in for the first time, or even register, into authors.

Get hold of com_smf, open it up and using dreamweaver, or something similar, find and replace all numbers that are 18 to 19

Then, you will need to find

INSERT INTO {$mosConfig_dbprefix}users
(name,username,email,password,gid)

And add in after password

usertype,

in both smf.php and smf_registeration.

Also, in the values line under where you find these alterations, you will need to add in:

'Author',
in the approiate place in the line, after the password bit.

And then viola, save, rezip, upload and it works

Many thanks and patience to all thoose who helped

Bugman

Advertisement: