<legend id='wIvyy'><style id='wIvyy'><dir id='wIvyy'><q id='wIvyy'></q></dir></style></legend>
    1. <small id='wIvyy'></small><noframes id='wIvyy'>

    2. <i id='wIvyy'><tr id='wIvyy'><dt id='wIvyy'><q id='wIvyy'><span id='wIvyy'><b id='wIvyy'><form id='wIvyy'><ins id='wIvyy'></ins><ul id='wIvyy'></ul><sub id='wIvyy'></sub></form><legend id='wIvyy'></legend><bdo id='wIvyy'><pre id='wIvyy'><center id='wIvyy'></center></pre></bdo></b><th id='wIvyy'></th></span></q></dt></tr></i><div id='wIvyy'><tfoot id='wIvyy'></tfoot><dl id='wIvyy'><fieldset id='wIvyy'></fieldset></dl></div>

          <bdo id='wIvyy'></bdo><ul id='wIvyy'></ul>
      1. <tfoot id='wIvyy'></tfoot>
      2. Laravel Hash::check() 总是返回 false

        Laravel Hash::check() always return false(Laravel Hash::check() 总是返回 false)
        1. <legend id='xKqRv'><style id='xKqRv'><dir id='xKqRv'><q id='xKqRv'></q></dir></style></legend>

              <small id='xKqRv'></small><noframes id='xKqRv'>

              <i id='xKqRv'><tr id='xKqRv'><dt id='xKqRv'><q id='xKqRv'><span id='xKqRv'><b id='xKqRv'><form id='xKqRv'><ins id='xKqRv'></ins><ul id='xKqRv'></ul><sub id='xKqRv'></sub></form><legend id='xKqRv'></legend><bdo id='xKqRv'><pre id='xKqRv'><center id='xKqRv'></center></pre></bdo></b><th id='xKqRv'></th></span></q></dt></tr></i><div id='xKqRv'><tfoot id='xKqRv'></tfoot><dl id='xKqRv'><fieldset id='xKqRv'></fieldset></dl></div>

                  <bdo id='xKqRv'></bdo><ul id='xKqRv'></ul>
                  <tfoot id='xKqRv'></tfoot>

                    <tbody id='xKqRv'></tbody>
                • 本文介绍了Laravel Hash::check() 总是返回 false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有个人资料表格供用户编辑自己的个人资料.在这种形式中,我有当前密码.必须从 seved 匹配到数据库中.

                  I have profile form for user can edit own profiles. in this form I have current password. that must be match from seved into database.

                  表格:

                  {{ Form::password('currPassword', array('id'=>'currPassword')) }}
                  

                  我想在 Controller 中有这个功能来检查数据库.

                  i want to have this function in Controller to check this with database.

                  $data = User::find($id);
                  if( ! Hash::check( $data->password , Input::get('currPassword') ) )
                  {
                      return Redirect::to('/admin/profile')
                          ->with('message', 'Current Password Error !')
                          ->withInput();
                  }
                  

                  散列 123456 密码进入数据库是可以的,并且在将 123456 放入 currPassword 后必须返回 TRUE 但是总是返回 FALSE.

                  hashed 123456 password into database is ok and after putting 123456 in currPassword that must be return TRUE but that return FALSE always.

                  推荐答案

                  你使用了错误的参数顺序.它是 Hash::check($input, $hash),而不是相反.

                  You're using the wrong argument order. It's Hash::check($input, $hash), not the other way around.

                  简短的修补程序示例:

                  [1] > $pw = 123456;
                  // 123456
                  [2] > $hashed = Hash::make($pw);
                  // '$2y$10$xSugoyKv765TY8DsERJ2/.mPIOwLNdM5Iw1n3x1XNVymBlHNG4cX6'
                  [3] > Hash::check($hashed, $pw);
                  // false
                  [4] > Hash::check($pw, $hashed);
                  // true
                  

                  这篇关于Laravel Hash::check() 总是返回 false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Laravel 4 - Connect to other database(Laravel 4 - 连接到其他数据库)
                  Call external API function from controller, LARAVEL 4(从控制器调用外部 API 函数,LARAVEL 4)
                  Empty string instead of null values Eloquent(空字符串而不是空值 Eloquent)
                  quot;laravel.logquot; could not be opened: failed to open stream(“laravel.log无法打开:无法打开流)
                  Displaying the Error Messages in Laravel after being Redirected from controller(从控制器重定向后在 Laravel 中显示错误消息)
                  Laravel Creating Dynamic Routes to controllers from Mysql database(Laravel 从 Mysql 数据库创建到控制器的动态路由)

                  1. <tfoot id='qLArX'></tfoot>

                          <bdo id='qLArX'></bdo><ul id='qLArX'></ul>
                          <legend id='qLArX'><style id='qLArX'><dir id='qLArX'><q id='qLArX'></q></dir></style></legend>

                            <small id='qLArX'></small><noframes id='qLArX'>

                              <tbody id='qLArX'></tbody>
                            <i id='qLArX'><tr id='qLArX'><dt id='qLArX'><q id='qLArX'><span id='qLArX'><b id='qLArX'><form id='qLArX'><ins id='qLArX'></ins><ul id='qLArX'></ul><sub id='qLArX'></sub></form><legend id='qLArX'></legend><bdo id='qLArX'><pre id='qLArX'><center id='qLArX'></center></pre></bdo></b><th id='qLArX'></th></span></q></dt></tr></i><div id='qLArX'><tfoot id='qLArX'></tfoot><dl id='qLArX'><fieldset id='qLArX'></fieldset></dl></div>