How to gets users EMAIL by their USERNAME
How to gets users EMAIL by their USERNAME
How to gets users EMAIL by their USERNAME
There’s a filter called get_comment_author that you can hook into to modify a comment author’s appearance. add_filter( ‘get_comment_author’, function( $author, $comment_id, $comment ) { // limit to first 10 characters $author = substr( $author, 0, 10 ); return $author; }, 10, 3 );
How to assign a UserName value at creation
This function would generate a unique user login slug: function my_unique_user_slug( $slug ) { global $wpdb; $check_sql = “SELECT user_login FROM $wpdb->users WHERE user_login = %s LIMIT 1”; if ( ! $wpdb->get_var( $wpdb->prepare( $check_sql, $slug ) ) ) { return $slug; } $suffix = 2; do { $alt_slug = $slug . $suffix; $user_slug_check = $wpdb->get_var( … Read more
Allowing Non-Latin Characters In WordPress Registration
I figured it out… $meta_value = get_user_meta( $atts[‘owner’], $meta_key, true ); $store_numbers = array(); foreach ($meta_value as $store_number) { $store_numbers[] = ‘shop’.$store_number; } $usernames = $store_numbers;
function login_redirect( $redirect_to, $request, $user ){ $URL =”http://www.abcgg.com”; return $URL; } add_filter( ‘login_redirect’, ‘login_redirect’, 10, 3 );
Create a unique username with validation on wordpress registration
this is the whole code in stoerer.php <!doctype html> <html lang=”de”> <meta charset=”utf-8″> <title> Störer</title> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js”></script> <link rel=”stylesheet” href=”style.css” type=”text/css”> </head> <body> <header> <button>Ich bin ein Störer</button> <!– Und dann die Info-Box –> <div id=”infoBox”> <button class=”cross” type=”button”>X</button> <p> Hello </p> <?php wp_get_current_user(); ?> <p> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, … Read more
How to change default username field after login