Advertisement
Guest User

Untitled

a guest
Mar 9th, 2017
634
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function verify_username_password( $user, $username, $password ) {
  2. $login_page = home_url( '/login/' );
  3. if( $username == "" || $password == "" ) {
  4. wp_redirect( $login_page . "?login=empty" );
  5. exit;
  6. }
  7. }
  8. add_filter( 'authenticate', 'verify_username_password', 1, 3);
  9.  
  10. if (is_super_admin()) {
  11. header('Location: wp-admin.php');
  12. }
  13. else {
  14. header('Location: index.php');
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement