Title: jan4971's Replies | WordPress.org

---

# jan4971

  [  ](https://wordpress.org/support/users/jan4971/)

 *   [Profile](https://wordpress.org/support/users/jan4971/)
 *   [Topics Started](https://wordpress.org/support/users/jan4971/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jan4971/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jan4971/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jan4971/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jan4971/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jan4971/favorites/)

 Search replies:

## Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress] [Feature request] Support for simple http uploader](https://wordpress.org/support/topic/feature-request-support-for-simple-http-uploader/)
 *  Thread Starter [jan4971](https://wordpress.org/support/users/jan4971/)
 * (@jan4971)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/feature-request-support-for-simple-http-uploader/#post-4959486)
 *     ```
       function my_media_uploader_filter() {
         return false;
       }
       add_filter('wpua_is_author_or_above', 'my_media_uploader_filter');
       ```
   
 * Working for me 🙂
 * EDIT: I added:
 *     ```
       if ( $post->post_name == 'put your postname here' ) {
       			return false;
       	}
       ```
   
 * to restrict this to a specific page.
 * For me it looks like this in the end:
 *     ```
       function my_media_uploader_filter() {
   
       	if ( $post->post_name == 'put your postname here' ) {
       			return false;
       	}
       }
       add_filter('wpua_is_author_or_above', 'my_media_uploader_filter');
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress] [Feature request] Support for simple http uploader](https://wordpress.org/support/topic/feature-request-support-for-simple-http-uploader/)
 *  Thread Starter [jan4971](https://wordpress.org/support/users/jan4971/)
 * (@jan4971)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/feature-request-support-for-simple-http-uploader/#post-4959465)
 * > What other plugins do you have active?
 * I already tried it with all other plugins disabled.
 * > The Media Uploader shows for Authors, Editors, and Administrators because they
   > all have upload_files capability
 * Yup. Removing it gets the simple uploader, but i cant upload files in posts or
   pages. But it works for uploading avatars.
 * > If you’re getting an http error with the Media Uploader after trying to upload
   > a file, I can’t say for sure what it would be
 * Me neither, in the backend it works for all uesrs btw. In the frontend it does
   not work.
 * So my question is, if there is a way to force the simple http uploader for the
   shortcode for everyone.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Problem with user_mail in functions.php](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/)
 *  Thread Starter [jan4971](https://wordpress.org/support/users/jan4971/)
 * (@jan4971)
 * [12 years ago](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/#post-4828597)
 * I kinda solved it:
 * I just added some custom fields to the registration form and used this nice little
   thing [thing](http://stevegrunwell.com/blog/quick-tip-set-the-default-display-name-for-wordpress-users/)
   to set the display name as “last_name first_name”.
 * So i keep sorting by display name which is now “last_name first_name”.
 * I know, it’s not perfect, but it’s doing the job.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Problem with user_mail in functions.php](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/)
 *  Thread Starter [jan4971](https://wordpress.org/support/users/jan4971/)
 * (@jan4971)
 * [12 years ago](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/#post-4828596)
 * Thank you very much for your help [@bcworkz](https://wordpress.org/support/users/bcworkz/).
 * I mark it as resolved.
 * I will report if i found an solution for the last_name sorting problem.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Problem with user_mail in functions.php](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/)
 *  Thread Starter [jan4971](https://wordpress.org/support/users/jan4971/)
 * (@jan4971)
 * [12 years ago](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/#post-4828576)
 * > In other words, try this line:
   >  $content .= “<p class=’author-description’>{
   > $user->user_email}</p>”;
 * That’s the full working code for everyone who’s interested in making something
   similar.
 *     ```
       function my_authors_list_shortcode( $atts = array() ) {
           global $wpdb;
       $users = $wpdb->get_results( "SELECT * FROM {$wpdb->users}" );
       $user_info = get_userdata($user->ID);
   
           $content = "<ul class='authors-list'>";
           foreach( $users as $user ) {
               $content .= "<li>";
               $content .= get_avatar( $user->ID, 70 );
               $content .= "<h3>" . get_user_meta( $user->ID, 'last_name', true ) . "";
               $content .= " " . get_user_meta( $user->ID, 'first_name', true ) . "</h3>";
       		$content .= "<p class='author-description'>{$user->user_email}</p>";
               $content .= "<p class='author-description'>" . get_user_meta( $user->ID, 'phone', true ) . "</p>";
               $content .= "<p class='author-description'>" . get_user_meta( $user->ID, 'mobil', true ) . "</p>";
       		$content .= "<p class='author-description'>" . get_user_meta( $user->ID, 'street', true ) . "</p>";
       		$content .= "<p class='author-description'>" . get_user_meta( $user->ID, 'livingplace', true ) . "</p>";
       		$content .= "</li>";
           }
           $content .= "</ul>";
           return $content;
       }
       ```
   
 * That’s fantastic! Thanks for helping me out !
 * Is there a way to sort the output ascending with the last name to make a List
   from A-Z ?
 * EDIT: I almost figured it out by myself:
 * `$users = $wpdb->get_results( "SELECT * FROM {$wpdb->users} ORDER BY display_name");`
 * I still cant sort by last_name…
    Could you please give me a last push ? 😀
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Problem with user_mail in functions.php](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/)
 *  Thread Starter [jan4971](https://wordpress.org/support/users/jan4971/)
 * (@jan4971)
 * [12 years ago](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/#post-4828540)
 * > Your code is currently only getting user ID and display_name from the DB
 * Now I came up with this:
 *     ```
       add_shortcode('authors-list', 'my_authors_list_shortcode');
       function my_authors_list_shortcode( $atts = array() ) {
           global $wpdb;
       $users = $wpdb->get_results( "SELECT * FROM {$wpdb->users}" );
   
           $content = "<ul class='authors-list'>";
           foreach( $users as $user ) {
               $content .= "<li>";
               $content .= get_avatar( $user->ID, 70 );
               $content .= "<h3>" . $user->display_name . "</h3>";
               $content .= "<p class='author-description'>" . get_user_meta( $user->ID, 'user_mail', true ) . "</p>";
               $content .= "<p class='author-description'>" . get_user_meta( $user->ID, 'phone', true ) . "</p>";
               $content .= "<p class='author-description'>" . get_user_meta( $user->ID, 'mobil', true ) . "</p>";
       		$content .= "<p class='author-description'>" . get_user_meta( $user->ID, 'street', true ) . "</p>";
       		$content .= "<p class='author-description'>" . get_user_meta( $user->ID, 'livingplace', true ) . "</p>";
       		$content .= "</li>";
           }
           $content .= "</ul>";
           return $content;
       }
       ```
   
 * Everything is getting put out, except for mail.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Problem with user_mail in functions.php](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/)
 *  Thread Starter [jan4971](https://wordpress.org/support/users/jan4971/)
 * (@jan4971)
 * [12 years ago](https://wordpress.org/support/topic/problem-with-user_mail-in-functionsphp/#post-4828537)
 * thanks for helping me. 🙂
    I tried to output mail adresses like this:
 * `$content .= "<p class='author-description'>" . $current_user->user_email . "
   </p>";`
 * But it didnt work.
    I just want some details and not everthing.
 * EDIT:
 * `$users = $wpdb->get_results( "SELECT ID, display_name FROM {$wpdb->users}" );`
 * I will try to change this line to:
 * `$users = $wpdb->get_results( "SELECT * FROM {$wpdb->users}" );`
 * Will report if it works.

Viewing 7 replies - 1 through 7 (of 7 total)