Community Support Forums — WordPress® ( Users Helping Users ) — 2011-10-28T14:47:42-05:00 http://www.primothemes.com/forums/feed.php?f=36&t=14806 2011-10-28T14:47:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=49095#p49095 <![CDATA[Re: Email as Username]]> @seozones @bsowards
Forum rank updated to Experienced User

Statistics: Posted by Jason Caldwell — October 28th, 2011, 2:47 pm


]]>
2011-10-28T13:18:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=49085#p49085 <![CDATA[Re: Email as Username]]> http://wordpress.org/extend/plugins/si- ... wordpress/ ... that the captcha isn't recognized on Submit action. Any idea why that would be?

Statistics: Posted by antseo — October 28th, 2011, 1:18 pm


]]>
2011-10-28T13:10:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=49083#p49083 <![CDATA[Re: Email as Username]]>
You can see an example and grab my modified version of the script over here: viewtopic.php?f=4&t=15672&p=49082#p49082

Statistics: Posted by Raam Dev — October 28th, 2011, 1:10 pm


]]>
2011-10-08T16:03:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=45150#p45150 <![CDATA[Re: Email as Username]]> Statistics: Posted by antseo — October 8th, 2011, 4:03 pm


]]>
2011-10-07T03:56:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=45036#p45036 <![CDATA[Re: Email as Username]]>

Statistics: Posted by Cristián Lávaque — October 7th, 2011, 3:56 am


]]>
2011-10-07T01:51:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=45022#p45022 <![CDATA[Re: Email as Username]]>
http://wordpress.org/extend/plugins/wp-email-login/

Statistics: Posted by sonora — October 7th, 2011, 1:51 am


]]>
2011-09-14T10:40:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=37208#p37208 <![CDATA[Re: Email as Username]]>
http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/email-login-randomized-user-urls-solution/

Statistics: Posted by bsowards — September 14th, 2011, 10:40 am


]]>
2011-09-06T12:32:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=34100#p34100 <![CDATA[Re: Email as Username]]> Statistics: Posted by antseo — September 6th, 2011, 12:32 pm


]]>
2011-09-06T12:22:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=34099#p34099 <![CDATA[Re: Email as Username]]>
There's no attachment yet, I haven't made the plugin yet. :)

Statistics: Posted by bsowards — September 6th, 2011, 12:22 pm


]]>
2011-09-04T14:56:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33987#p33987 <![CDATA[Re: Email as Username]]>
So with regard to the username, I guess I don't why the email can't be used since it's a unique identifier?

Statistics: Posted by antseo — September 4th, 2011, 2:56 pm


]]>
2011-09-04T11:12:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33978#p33978 <![CDATA[Re: Email as Username]]>
Once i have this plugin built I'll upload the notification here, probably will take a few weeks.

Statistics: Posted by bsowards — September 4th, 2011, 11:12 am


]]>
2011-09-04T10:46:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33976#p33976 <![CDATA[Re: Email as Username]]> Statistics: Posted by antseo — September 4th, 2011, 10:46 am


]]>
2011-09-04T09:41:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33974#p33974 <![CDATA[Re: Email as Username]]>
So... this code snippet is for auto-generating usernames instead. As of right now it doesn't appear to validate that the username is available. If we added that then you could have this script auto-generate a username, set username to "display:none," and then use the "Email as Login" plugin.

Effecctively, this would make the email the username as far as the user is concerned, without hacking Wordpress.

I think this will be my next plugin...

Statistics: Posted by bsowards — September 4th, 2011, 9:41 am


]]>
2011-09-04T01:54:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33959#p33959 <![CDATA[Re: Email as Username]]> Statistics: Posted by antseo — September 4th, 2011, 1:54 am


]]>
2011-09-02T23:00:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33838#p33838 <![CDATA[Re: Email as Username]]>

Statistics: Posted by Cristián Lávaque — September 2nd, 2011, 11:00 pm


]]>
2011-09-02T20:58:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33813#p33813 <![CDATA[Re: Email as Username]]> Statistics: Posted by bsowards — September 2nd, 2011, 8:58 pm


]]>
2011-09-02T20:53:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33812#p33812 <![CDATA[Re: Email as Username]]> I went ahead and finished this up for anyone that wants to use it.

Create this directory and file:
/wp-content/mu-plugins/email-to-username.php
Code:
<?php
add_action 
("login_head", "s2_email_to_username", 1000);
function s2_email_to_username ()
    {
?>
        <script type = "text/javascript">
            (function ($) /* Wraps this `$ = jQuery` routine. */
                {
                    $.fn.swapWith = function (to) /* Utility extension for jQuery. */
                        {
                            return this.each (function ()
                                {
                                    var $to = $ (to).clone (true), $from = $ (this).clone (true);
                                    $(to).replaceWith ($from), $ (this).replaceWith ($to);
                                });
                        };
                    /**/
                    $(document).ready (function () /* Handles email-to-username on keyup. */
                        {
                            var email = 'input#user_email', login = 'input#user_login';
                            $(email).closest ('p').swapWith ($ (login).closest ('p')), $ (email).keyup (function ()
                                {
                                    $(login).val ($.trim ($ (email).val ().split (/@/)[0].replace (/[^\w]/gi, '')));
                                });
                        });
                }) (jQuery);
        </script>
<?php
    
}
?>
* Please make sure there are no extra spaces/tabs/line breaks before or after the <?php ?> tags.

Statistics: Posted by Jason Caldwell — September 2nd, 2011, 8:53 pm


]]>
2011-09-02T19:28:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33797#p33797 <![CDATA[Re: Email as Username]]> Thanks for the heads up on this thread Cristián.

@bsowards: I would advise against trying to modify the WordPress core in this regard, because many areas of WordPress, and almost all plugins rely on a strict Username validation and sanitation, which would not expect nor allow characters found in email addresses, such as the @ symbol. This becomes even more of an issue in a Multisite Network installation of WordPress.

Instead, you might try pre-populating the Username field, via JavaScript. Perhaps using jQuery to fill the Username field with only the first part of the email address being typed in ( i.e. johndoe22@example.com ), would automatically populate the Username field with: johndoe22, and then the User would have the ability to change it if they like something better. This would need to be custom coded ( just a few lines ), and then connected via the Hook login_head for the WordPress core.

Statistics: Posted by Jason Caldwell — September 2nd, 2011, 7:28 pm


]]>
2011-09-01T22:08:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33707#p33707 <![CDATA[Re: Email as Username]]> http://adambrown.info/p/wp_hooks

I hope that helps. :)

Statistics: Posted by Cristián Lávaque — September 1st, 2011, 10:08 pm


]]>
2011-09-01T10:00:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14806&p=33627#p33627 <![CDATA[Email as Username]]>

Is there a recommended way to make the username field for registration accept an email address?

Rather not deal with users trying to guess what username they should pick.

Hooks/function.php works for me as an approach.

Statistics: Posted by bsowards — September 1st, 2011, 10:00 am


]]>