Closed (fixed)
Project:
User Import
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2007 at 20:44 UTC
Updated:
15 Jan 2009 at 02:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
emackn commentedBy changing the preg_replace from:
to
I was able to import email address as the username.
Comment #2
robert castelo commentedGood idea, I'll add it to the next release.
Comment #3
mfbThis patch allows typical email address characters: dot, underscore, hyphen and plus sign. within the preg brackets, of these only hyphen is a metacharacter which needs to be escaped.
Comment #4
mfbmarked http://drupal.org/node/165717 as duplicate
Comment #5
coupet commentedDoes this patch work with LoginToboggan ?
Comment #6
mfbI am using it with logintoboggan. However I have not tested it with the logintoboggan setting to force usernames to not be email addresses. Obviously in my case I don't want to do this.
Comment #7
coupet commentedname is varchar(60) and mail varchar(64) are of different sizes.
Should we generate username based on email, firstname, lastname or other criteria; instead of inserting email in the name field?
We may want to think about OpenID support as planned here http://drupal.org/node/162356th
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`uid` int(10) unsigned NOT NULL default '0',
`name` varchar(60) NOT NULL default '',
`pass` varchar(32) NOT NULL default '',
`mail` varchar(64) default '',
`mode` tinyint(4) NOT NULL default '0',
`sort` tinyint(4) default '0',
`threshold` tinyint(4) default '0',
`theme` varchar(255) NOT NULL default '',
`signature` varchar(255) NOT NULL default '',
`created` int(11) NOT NULL default '0',
`access` int(11) NOT NULL default '0',
`login` int(11) NOT NULL default '0',
`status` tinyint(4) NOT NULL default '0',
`timezone` varchar(8) default NULL,
`language` varchar(12) NOT NULL default '',
`picture` varchar(255) NOT NULL default '',
`init` varchar(64) default '',
`data` longtext,
PRIMARY KEY (`uid`),
UNIQUE KEY `name` (`name`),
KEY `created` (`created`),
KEY `access` (`access`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`uid`, `name`, `pass`, `mail`, `mode`, `sort`, `threshold`, `theme`, `signature`, `created`, `access`, `login`, `status`, `timezone`, `language`, `picture`, `init`, `data`) VALUES
(0, '', '', '', 0, 0, 0, '', '', 0, 0, 0, 0, NULL, '', '', '', NULL),
(1, 'admin', 'eb06eff7259e802e5b331eb72f23e96c', 'coupet@yahoo.com', 0, 0, 0, '', '', 1187401438, 1187631257, 0, 1, '0', '', '', 'coupet@yahoo.com', 'a:0:{}');
Comment #8
goose2000 commentedThanks, I am using this now - need email logins to work with IMAP servers!
Comment #9
mfbHere's a revised patch -- drupal core does not allow "+" in user names (although it is a valid character in e-mail addresses).
Comment #10
mfbMarking this as a critical bug since dash, dot and underscore really should be allowed in usernames.
Comment #11
giorgoskI have a case where I want to allow usernames with parentheses ( )
if I tweaked the code to do it, would it create a problem ?
Comment #12
mfbNot a good idea since drupal core doesn't allow parentheses in user names.
Comment #13
robert castelo commentedFixed in 5.x-2.0-beta1, please re-open this issue if you can still replicate the bug.