• TrevorNet

    (@trevornet)


    First off, I am rather new to WordPress. I’ve checked it out a few times, but I am finally taking the plunge if I can solve the following problem.

    I have a 4000+ member community website built on ExpressionEngine (EE). EE uses SHA1 for password encryption. I have picked through the WordPress code, as well as a number of plug-ins, looking for a way to switch WordPress authentication over to SHA1. Other than gaining a deep appreciation for WordPress, I have not made any progress in the past 1.5 weeks. I’ve literally followed the code (Yeah Netbeans!) and think I have the main area of interest narrowed down to [wp-includes]/pluggable.php. Is there anyone that can point me in the right direction? While I would rather not hack the core, I am open to any solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    If you need to implement another authentication mechanism, you can do that by using the “authenticate” filter hook.

    Here’s a basic example:

    add_filter('authenticate','my_auth_function', 10, 3);
    function my_auth_function($user, $username, $password) {
      if ( is_a($user, 'WP_User') ) { return $user; }
    
      // do your authentication based on $username and $password here
      // end result must be a WP_User object, like so:
      $user = new WP_User(123);
      return $user;
    
      // if auth failed, return a WP_Error object instead
    }

    Thread Starter TrevorNet

    (@trevornet)

    Thank you so much on both fronts. Very impressive!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘SHA1 Encryption’ is closed to new replies.