Save last login date in global before change it?
Don’t use global variables. You can do it like this without global variable: global $current_user; echo get_user_meta( $current_user->ID, ‘last-login’, true );
Don’t use global variables. You can do it like this without global variable: global $current_user; echo get_user_meta( $current_user->ID, ‘last-login’, true );
although I can play around with the CSS If you are not going to use CSS (or jQuery) to modify the position of these elements, you have to create your own login form: Customizing_the_Login_Form#Make_a_Custom_Login_Page. There is no hook in wp-login.php that allows to move these elements inside the form field. Related: Where to put my … Read more
Add this to wp-config.php before line /* That’s all, stop editing! Happy blogging. */ and check if it works. define( ‘WP_HOME’, ‘http://localhost/ecom’ ); define( ‘WP_SITEURL’, ‘http://localhost/ecom’ );
In WordPress 3.6 they added the “heartbeat” to the admin area and one of the features is this authentication check. You can disable this admin auth popup by adding the following to your functions.php file… // Remove admin login popup remove_action(‘admin_enqueue_scripts’, ‘wp_auth_check_load’);
I have solved this strange problem by myself. Share my experience to all. Find these 2 lines in /etc/php.ini upload_max_filesize 16M post_max_size 16M Add common before, so that change as: ;upload_max_filesize 16M ;post_max_size 16M And final, do not forget restart apache: service httpd restart via SSH. Then I could login into my site under linux … Read more
Change wp-admin login is a light plugin that allows you easily and safely to change wp-admin to anything you want. It does not rename or change files in core. It simply intercepts page requests and works on any WordPress website. After you activate this plugin the wp-admin directory and wp-login.php page will become unavailable, so … Read more
You can get the current blog id (which would be the site in a network, your subsite) with get_current_blog_id() and you can get details of a particular site with get_blog_details() from codex: get_blog_details(), passed an id of 1, may return the following object: [blog_id] => 1 [site_id] => 1 [domain] => foo-multi-site.com [path] => /site-path/ … Read more
Well, considering rewrite and redirect like in comments – choose what fits you best . HOOK wp_login_url(); //this function generate the login url address Example: add_filter( ‘login_url’, ‘another_login_url’, 10, 2); function another_login_url( $force_reauth, $redirect ){ $login_url=”your_chosen_login_url”; if ( !empty($redirect) ) $login_url = add_query_arg( ‘redirect_to’, urlencode( $redirect ), $login_url ); if ( $force_reauth ) $login_url = … Read more
I think this may be a WordPress bug. According to the documentation, wp_signon() is the correct function to log a user in. In your script, you are using is_user_logged_in() to verify the user was correctly logged in after your call to wp_signon(). is_user_logged_in() uses the global $current_user variable which doesn’t appear to get set when … Read more
This was caused simply by the salts in wp-config.php being at the end of the file, after the call to wp-settings.php (they were inserted by an Ansible script) rather than above the line: /* That’s all, stop editing! Happy publishing. */ 🙁