Here's my script: TRUNCATE adusers;
LOAD DATA INFILE '/home/kt/scripts/adusers.csv' INTO TABLE adusers FIELDS TERMINATED BY ',' ENCLOSED BY '"' IGNORE 1 LINES (first_name, last_name, username); update adusers set first_name = CONCAT(UCASE(SUBSTRING(`first_name`, 1, 1)),LOWER(SUBSTRING(`first_name`, 2))); update adusers set last_name = CONCAT(UCASE(SUBSTRING(`last_name`, 1, 1)),LOWER(SUBSTRING(`last_name`, 2))); UPDATE adusers SET username = lower(username); On Tuesday, November 27, 2012 9:24:45 AM UTC-8, Benjamin Wanicur wrote: > > Hi KT > > Can you post the code that imports your users via CSV ? > > > On Tue, Nov 27, 2012 at 12:11 PM, KT <[email protected] <javascript:>>wrote: > >> Strange issue - I am importing users into a user table via csv. >> >> In my Rails app interface, I can view the new users. However, when the >> imported users attempt to login, they cannot ("Something went wrong", but >> no errors in log). >> >> If I use the interface to manually save their user record (making no >> changes) they can suddenly login. If I create the new users through the >> interface, they can login. I am using net-ldap authentication. >> >> Why would imported users not be able to login without manual interaction >> to the record? >> >> -- >> SD Ruby mailing list >> [email protected] <javascript:> >> http://groups.google.com/group/sdruby > > > -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
