News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

import members from a file

Started by djvx, November 17, 2006, 08:16:55 PM

Previous topic - Next topic

djvx

Hello
I would like to import a list of members subscribed to a newsletter so that they become  registered to the forum and they could then set a password. The list is a text file with coma or semicol which is exported automatically from my newsletter script-database.
Is it possible with smf ?
Thanks  :)
Vik

JayBachatero

It can be done.  The only problem that I see is with passwords.  Do you have the members email?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

djvx

That's all I got! on my text list. ::)
Vik

JayBachatero

If you had their email address it would make things easier.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

djvx

Quote from: djvx on November 18, 2006, 01:36:17 PM
That's all I got! on my text list. ::)
means "yes" I have only emails ! ;) but I do have those emails!
Now, how easy is it? :P
Vik

JayBachatero

Well a script would be needed to explode that list and get the emails then from there generate a random password for each member and mail it to them.  It shouldn't be too hard.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

djvx

#6
hello
Can I use dynamite or do I need to go to university for a year? ;)
Well it sounds nice and I understand you have given the right steps for the operation.
All I know about php is how to install scripts and do minor modifications and don't know more coding than echo & include stuff. If I can do what you say with little research, then I'm willing, but I need little more clues. It could be a good opportunity for me to work on harder things.

There is a little change... the subscribers are now listed in my local database and I suppose it's better to make a script which calls the table. Should I proceed as you said or...?

Thanks

Vik

JayBachatero

It would require some PHP knowledge.  Umm send me the list of members.  I'll take a look into it when I get a chance.  It shouldn't be too hard to do.  Just need to take the time and do it.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

JayBachatero

You mean that you imported the users to the database? 
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

djvx

They are in a table of my "Newsletter"-script not in smf.
Vik

JayBachatero

Ok I thought you said that they were in a file not a table.  Can you post the structure of the table?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

djvx

How do I do that? from phpmyadmin?
Vik

JayBachatero

Yea from phpMyAdmin.  Just the structure without data.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

djvx

#13
got it ... Is this it?


-- phpMyAdmin SQL Dump
-- version 2.6.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 21, 2006 at 01:51 AM
-- Server version: 4.1.9
-- PHP Version: 4.3.10
--
-- Database: `mobilohm`
--

-- --------------------------------------------------------

--
-- Table structure for table `wa_abo_liste`
--

CREATE TABLE `wa_abo_liste` (
  `abo_id` int(11) NOT NULL default '0',
  `liste_id` smallint(6) NOT NULL default '0',
  `format` tinyint(1) NOT NULL default '0',
  `send` tinyint(1) NOT NULL default '0',
  `register_key` char(20) default NULL,
  `register_date` int(11) NOT NULL default '0',
  `confirmed` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`abo_id`,`liste_id`),
  UNIQUE KEY `register_key_idx` (`register_key`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `wa_abo_liste`
--

INSERT INTO `wa_abo_liste` VALUES (1, 2, 2, 0, 'f56dcb763505999cf003', 1162479637, 1);
INSERT INTO `wa_abo_liste` VALUES (2, 2, 2, 0, '81a7e8d4472a0241472a', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (3, 2, 2, 0, '75989910d0245f88934c', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (4, 2, 2, 0, 'a5517a7601c7feb86497', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (5, 2, 2, 0, 'cc73b7cb22e05fe5113e', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (6, 2, 2, 0, '524dd21808f432cfadf3', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (7, 2, 2, 0, 'db00656d91a35e764406', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (8, 2, 2, 0, 'efe6ece4812695712b2f', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (9, 2, 2, 0, 'c629a6c8e19737fcd4c0', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (10, 2, 2, 0, '0d143a96f1f74725ae8a', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (11, 2, 2, 0, 'df2bf65320746737f64b', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (12, 2, 2, 0, '50db498fb4f41c5c7a3b', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (13, 2, 2, 0, '36681e9e6ef68faa0265', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (14, 2, 2, 0, '9a01e5ad5247d5f740a8', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (15, 2, 2, 0, '1cd7ea36a6b5ab1123f4', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (16, 2, 2, 0, '09dbcb127a57ea261bc9', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (17, 2, 2, 0, 'bec69de797c197fbddca', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (18, 2, 2, 0, '48542d2542d8cfeec622', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (19, 2, 2, 0, 'b48520f195844466ed0e', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (20, 2, 2, 0, 'bc589d90945cecad79f0', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (21, 2, 2, 0, '47d4c73c342a7b6e5f92', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (22, 2, 2, 0, '151fdee749e2cea34b01', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (23, 2, 2, 0, '12011db7b4e1a84bd15c', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (24, 2, 2, 0, '5e5211dcadb2aace8ded', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (25, 2, 2, 0, '6f9ac91ac44b40e23d8e', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (26, 2, 2, 0, 'ed350fd2704cb1cd4483', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (27, 2, 2, 0, '97767c32f90af7edd9cc', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (28, 2, 2, 0, '665f87ad12ea06e9b496', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (29, 2, 2, 0, '9d214a71498cefa61fc5', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (30, 2, 2, 0, '726152c84791e9549dc2', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (31, 2, 2, 0, '5505552820dfcd64b52b', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (32, 2, 2, 0, '05316edfea55c2d314e9', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (33, 2, 2, 0, 'b391325fab32f7d0a2a8', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (34, 2, 2, 0, '7cf19c6e03ac14a099c7', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (35, 2, 2, 0, '030f85e7a59ea6486a2f', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (36, 2, 2, 0, '8863b8fce3cf305686ce', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (37, 2, 2, 0, '07acdf736f76dd3b518f', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (38, 2, 2, 0, '16454c51168d980a26dd', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (39, 2, 2, 0, '55faae62c6b1650599f7', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (40, 2, 2, 0, '70bc6987ff4d9e887c6e', 1162479915, 1);
INSERT INTO `wa_abo_liste` VALUES (41, 2, 2, 0, 'e4d2881405f250fafd47', 1162479915, 1);


EDIT: Used code tag.
Vik

JayBachatero

I don't think that's it.  I don't see any emails there.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

djvx

ok ! this one has
-- phpMyAdmin SQL Dump
-- version 2.6.1
-- http://www.phpmyadmin.net [nofollow]
--
-- Host: localhost
-- Generation Time: Nov 21, 2006 at 01:58 AM
-- Server version: 4.1.9
-- PHP Version: 4.3.10
--
-- Database: `mobilohm`
--

-- --------------------------------------------------------

--
-- Table structure for table `wa_abonnes`
--

CREATE TABLE `wa_abonnes` (
  `abo_id` int(11) NOT NULL auto_increment,
  `abo_pseudo` varchar(30) NOT NULL default '',
  `abo_pwd` varchar(32) NOT NULL default '',
  `abo_email` varchar(255) NOT NULL default '',
  `abo_lang` varchar(30) NOT NULL default '',
  `abo_status` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`abo_id`),
  UNIQUE KEY `abo_email_idx` (`abo_email`),
  KEY `abo_status_idx` (`abo_status`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=42 ;

--
-- Dumping data for table `wa_abonnes`
--

INSERT INTO `wa_abonnes` VALUES (1, 'Vik', '102181979b6b42b456af3f568ccc3ce4', '[email protected]', 'francais', 1);
INSERT INTO `wa_abonnes` VALUES (2, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (3, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (4, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (5, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (6, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (7, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (8, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (9, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (10, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (11, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (12, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (13, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (14, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (15, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (16, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (17, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (18, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (19, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (20, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (21, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (22, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (23, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (24, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (25, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (26, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (27, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (28, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (29, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (30, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (31, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (32, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (33, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (34, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (35, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (36, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (37, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (38, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (39, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (40, '', '', '[email protected]', '', 1);
INSERT INTO `wa_abonnes` VALUES (41, '', '', '[email protected]', '', 1);
Vik

JayBachatero

Umm from the looks of it would be very simple to do since the password is there and it's hashed.  SMF can detect the different hashes and ask the user to change the password.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

djvx

Vik

JayBachatero

Ok double check for me.  In phpMyAdmin.  Check to see if all the members have a value for the abo_pseudo column.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

djvx

I know they don't. Only one has: me for testing purpose and because I had not implemented that possibilitypreviously.
Vik

Advertisement: