Inserting current user ID into Post for Author

You need to use the global variable for the user ID (if you actually need to use it) somewhat like this: global $user_ID; get_currentuserinfo(); The get_currentuserinfo() call will populate the global $user_ID variable which you can then use directly, as you have it in your args currently. Reference

Cannot retrieve active members only

Curly braces for foreach is missing. Try this: /* Template Name: Directory */ add_action( ‘genesis_entry_content’, ‘ogs_directory’, 5 ); function ogs_directory() { $args = array( ‘blog_id’ => 1, // unless yours is a multisite install, you shouldn’t need to change this ‘exclude’ => array(), // IDs of users that need to be excluded ‘orderby’ => ‘display_name’ … Read more

user login and its profile

I’ve just done something like this and it’s fairly simple add_filter(‘wp_nav_menu_items’, ‘add_login_logout_link’, 10, 2); function add_login_logout_link($items, $args) { //check if user is logged in, and add user name to menu if (is_user_logged_in()){ $user = wp_get_current_user(); $items .= ‘<li>’ . $user->display_name . ‘</li>’; } //add login/logout link to menu $items .= ‘<li>’. wp_loginout(get_permalink(),false) .'</li>’; return $items; … Read more

New User Save Filter

For this, you have to use user_register hook defined on wp-includes/users.php line 1759. personal_options_update hook is called, when an user updating his own profile. edit_user_profile_update is called, when an administrator updating other user profile. nothing is called, when an administrator creating a new user. On user-new.php page, new user are created using the edit_user function, … Read more

Can i use two different user tables for on WP install?

Well, it’s not going to work because you won’t always have the post value on each page (only when they have just logged in). So as soon as wp serves up the next page it won’t have a the POST variable anymore. Why do you feel a need to do this? (Personally I cannot think … Read more