adding members via sql

Hello,

 

I'm a developer and I need to add the members to the site via php and SQL. Any tips will be helpful. I'm currently searching for the proper table to insert the queries... I'll also need to verify these members once they try to access the site so any comments there are appreciated. thanks! :)

 

  • 815
  • More
Replies (3)
    • I included members into sys_accounts, addapting the database from dolphin 7.3.3 to the new una, all the proper fields are in there but not in the proper order(do they need to be?). Im getting problems getting these to show as activated accounts. here's my sql query with the first entry. (theres about 1700. what should i change? maybe e-mail not as a key? I dont have e-mails for everyone only about half.

       


      DROP TABLE sys_accounts;

      CREATE TABLE `sys_accounts` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `profile_id` int(10) unsigned NOT NULL,
      `email` varchar(255) NOT NULL,
      `password` varchar(40) NOT NULL DEFAULT '',
      `salt` varchar(10) NOT NULL DEFAULT '',
      `Status` enum('Unconfirmed','Approval','Active','Rejected','Suspended') NOT NULL DEFAULT 'Unconfirmed',
      `role` tinyint(4) unsigned NOT NULL DEFAULT '1',
      `receive_news` tinyint(4) NOT NULL DEFAULT '0',
      `Sex` varchar(255) NOT NULL DEFAULT '',
      `LookingFor` set('male','female') NOT NULL DEFAULT '',
      `DescriptionMe` text NOT NULL,
      `Country` varchar(255) NOT NULL DEFAULT '',
      `City` varchar(255) NOT NULL,
      `DateOfBirth` date NOT NULL,
      `lang_id` int(10) unsigned NOT NULL DEFAULT '0',
      `DateReg` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `DateLastEdit` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `DateLastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `DateLastNav` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `added` int(11) NOT NULL DEFAULT '0',
      `Tags` varchar(255) NOT NULL DEFAULT '',
      `zip` varchar(255) NOT NULL,
      `email_confirmed` tinyint(4) NOT NULL DEFAULT '0',
      `LangID` int(11) NOT NULL,
      `RateCount` int(11) NOT NULL,
      `Views` int(11) NOT NULL,
      `Rate` float NOT NULL,
      `logged` int(11) NOT NULL DEFAULT '0',
      `CommentsCount` int(11) NOT NULL,
      `PrivacyDefaultGroup` int(11) NOT NULL DEFAULT '3',
      `allow_view_to` int(11) NOT NULL DEFAULT '3',
      `UserStatus` varchar(64) NOT NULL DEFAULT 'online',
      `UserStatusMessage` varchar(255) NOT NULL DEFAULT '',
      `UserStatusMessageWhen` int(10) NOT NULL,
      `changed` int(11) NOT NULL DEFAULT '0',
      `Height` varchar(255) NOT NULL,
      `Weight` varchar(255) NOT NULL,
      `Income` varchar(255) NOT NULL,
      `Occupation` varchar(255) NOT NULL,
      `Religion` varchar(255) NOT NULL,
      `Education` varchar(255) NOT NULL,
      `Middle` varchar(255) NOT NULL,
      `Hobbies` text NOT NULL,
      `Interests` text NOT NULL,
      `Ethnicity` varchar(255) NOT NULL,
      `FavoriteMusic` text NOT NULL,
      `FavoriteFilms` text NOT NULL,
      `FavoriteBooks` text NOT NULL,
      `Salutation` varchar(15) DEFAULT NULL,
      `FirstName` varchar(255) NOT NULL,
      `MiddleName` varchar(255) NOT NULL,
      `LastName` varchar(255) NOT NULL,
      `Suffix` varchar(15) DEFAULT NULL,
      `Initiation_Date` varchar(255) NOT NULL,
      `name` varchar(255) NOT NULL,
      `Phone_Number` varchar(255) NOT NULL,
      `Full_addr` varchar(255) NOT NULL,
      `Mailing_Street` varchar(255) NOT NULL,
      `Mailing_City` varchar(255) NOT NULL,
      `Mailing_State` varchar(255) NOT NULL,
      `Mailing_Zip` varchar(255) NOT NULL,
      `Mailing_Line_2` varchar(255) NOT NULL,
      `NEW_ITEM` varchar(255) NOT NULL DEFAULT '',
      PRIMARY KEY (`id`),
      KEY `added` (`added`)
      ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

      INSERT INTO sys_accounts VALUES("1","admin","admin@thealum.net","password","salt","Active","3","0","male","","","US","","1995-06-01","0","0000-00-00 00:00:00","2017-06-22 03:50:49","2017-06-24 16:36:51","2017-06-24 18:45:02","0","","38614-2929","1","1","0","0","0","0","0","0","0","","","0","0","","","","","","","","","","","","","","Mr.","admin","","admin","","","admin admin",""," MS 38614","","","MS","38614","","");

      • Well ive added all the profiles to both the profiles and acconts fields but am unable to activate them. what am i missing?

         

        • Just some notes:

          - we'll create migration script from Dolphin to UNA soon (maybe a month or so)

          - Dolphin connect module is coming with the next update which allows to login to UNA with Dolphin credentials

          As for you question:

          you need to create profiles in both sys_accounts and bx_persons_data tables, as well an association need to be added for both tables in sys_profiles table. The structure is described here:

          https://github.com/unaio/una/wiki/User-Profiles

           

           

          Login or Join to comment.