Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

login

How to use current_user_can()?

Probably because the global $current_user isn’t valid yet, which is used by current_user_can(). However, you can use this instead; if ($user->has_cap(‘manage_options’)) { return admin_url(); }

Categories login Tags login

Is it possible to sign in with user_email in WordPress?

Here’s how we do it: $user = get_user_by(’email’, $email); if (wp_check_password($password, $user->user_pass, $user->ID)) { // Login successfull, redirect if needed wp_set_auth_cookie($user->ID); } Assuming of course that you got the $email and the $password variables from a POST request or something 🙂

Categories login Tags forms, login, users

Why does WordPress hide the reset password key from the URL?

To be honest? It’s a little bit hard to say… This behavior was introduced in 3.9.2 (which is security release). Here’s the bug in Trac: 29060: Don’t pass around the resetpass key, but there isn’t much info on why was it introduced in the bug report. Is it for security reasons? Most probably. But does … Read more

Categories login Tags login

How do I change the logo on the login page?

Here is a pretty simple approach to changing the logo. Mark Jaquith of WordPress released a plugin that allows you to upload an image which will be shown on the login page instead of the WP logo. Customize the WordPress Login Screen Logo

Categories login Tags login

How to pass users back and forth using session data?

If you will work with sessions, then init this at first in your plugin, theme. add_action( ‘init’, ‘my_start_session’ ); function my_start_session() { if ( session_id() ) return; @session_cache_limiter(‘private, must-revalidate’); //private_no_expire @session_cache_expire(0); @session_start(); } Alternative use the library from Eric Mann: WP Session Manager, also his tutorial.

Categories login Tags authentication, login, session

Synchronize WordPress user accounts across multiple domains and installations without using WordPress MU

(side note) In wp-config you can set: define(‘CUSTOM_USER_TABLE’, $table_prefix.’my_users’); define(‘CUSTOM_USER_META_TABLE’, $table_prefix.’my_usermeta’); So I would expect this to work especially for the case when you have centralized your user database… but it does not: http://core.trac.wordpress.org/ticket/13323 (and a username/password for the remote database to get the info from) I think this is the best way to go: … Read more

Categories login Tags login

Share login data/cookies between multiple installations

You can share user tables between different WordPress installations by installing the second site (“Site B”) to use the original site’s (“Site A”) database, then choosing to use an alternate table prefix during installation so as to keep the rest of the data separate. The second part of the problem is sharing login cookies between … Read more

Categories login Tags login

How to disable autocomplete on the wp-login.php page

Your only solution (without modifying core files) is to use JavaScript. function wpse_159462_login_form() { echo <<<html <script> document.getElementById( “user_pass” ).autocomplete = “off”; </script> html; } add_action( ‘login_form’, ‘wpse_159462_login_form’ ); Having said that, if you’re not the only one that will be signing in I would advise against disabling autocomplete, it will almost certainly **** people … Read more

Categories login Tags autocomplete, login

Woocommerce registration page [closed]

Using the [woocommerce_my_account] shortcode, a user will see their account details if they’re logged in and if they’re not logged in, they’ll see a login and registration form. Using the same page title “My Account” for these different users isn’t ideal because a user that has never created an account won’t naturally navigate to a … Read more

Categories login Tags login, user-registration, woocommerce-offtopic

Stop WordPress from logging me out (need to keep me logged in)

WordPress keeps you logged in for 48 hours by default. If you click the “Remember Me” checkbox, it will remember you for 14 days. If you would like to remain logged in for longer than this period of time, you must use the “Auth Cookie Expiration” hook that WordPress provides. Now, you’ve mentioned that you’ve … Read more

Categories login Tags login
Older posts
Newer posts
← Previous Page1 … Page70 Page71 Page72 … Page75 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress