title: any big differ between $user->getAuthPassword() and Auth::user()->password? laravel 4
body: <p>I was learning this login tutorial online with the choice for user to change password after login and the notes given are</p>
  
  <pre><code>if ($validator-&gt;fails())
  {
      return Redirect::route('account-change-password')
          -&gt;withErrors($validator);
  }
  else
  {
      $user = User::find(Auth::user()-&gt;id);
  
      $old_password = Input::get('old_password');
      $password = Input::get('password');
  
      if(Hash::check($old_password, $user-&gt;getAuthPassword()))
      {
          $user-&gt;password = Hash::make($password);
  
          if($user-&gt;save())
          {
              return Redirect::route('home')
                  -&gt;with('global', 'Your Password has been changed');
          }
      }
      else
      {
          return Redirect::route('account-change-password')
              -&gt;with('global', 'Your old password is incorrect');
      }
  }
  </code></pre>
  
  <p>in the tutorial inside the else <code>$user = User::find(Auth::user()-&gt;id);</code> is used right away and then the if statement to check the password is using <code>$user = User::find(Auth::user()-&gt;id);</code></p>
  
  <p>When I'm trying to do it on my on after watching the tutorial I did it differently.</p>
  
  <pre><code>if ($v-&gt;fails())
  {
      return Redirect::route('account-change-password')
          -&gt;withErrors($v)
          -&gt;with('global', 'Please check the errors in red');
  }
  else
  {
      if (Hash::check(Input::get('old_password'),Auth::user()-&gt;password))
      {
          $user = User::find(Auth::user()-&gt;id);
          $user-&gt;password = Hash::make(Input::get('new_password'));
          if ($user-&gt;save())
          {
              return Redirect::route('home')
                  -&gt;with('global', 'Password Changed.');
          }
      }
      return Redirect::route('account-change-password')
              -&gt;with('global', 'Old password is incorrect');
  }
  </code></pre>
  
  <p>I checked the password and the password in the database right away with <code>Auth::user()-&gt;password)</code> by using the if statement and put the <code>$user = User::find(Auth::user()-&gt;id);</code> inside the if statement in order for me to get access to <code>$user-&gt;password</code> and change the password.</p>
  
  <p>I know there are always lots different ways to do things but I'm just wondering if the way I am doing it would have some kind of problem in the future that I am not realizing it now and would be better to remember and stick to the way the tutorial taught.</p>