Permalink
Browse files

Fix infinite loop

Fix infinite loop on wp_error user_nicename_too_long
Add a limited 50 caracters user_nicename based on user_login
  • Loading branch information...
daidais committed Feb 23, 2016
1 parent 1db57bd commit 4379b813a7ef2aa8a4766182b539d930e13e281c
Showing with 4 additions and 0 deletions.
  1. +4 −0 syndicatedpost.class.php
View
@@ -2349,6 +2349,10 @@ function author_id ($unfamiliar_author = 'create') {
// Add a random disambiguator
$userdata['user_login'] .= substr(md5(uniqid(microtime())), 0, 6);
break;
case 'user_nicename_too_long' :
// Add a limited 50 caracters user_nicename based on user_login
$userdata['user_nicename'] = mb_substr( $userdata['user_login'], 0, 50 );
break;
case 'existing_user_email' :
// No disassemble!
$parts = explode('@', $userdata['user_email'], 2);

0 comments on commit 4379b81

Please sign in to comment.