<tfoot id='pFYwO'></tfoot><legend id='pFYwO'><style id='pFYwO'><dir id='pFYwO'><q id='pFYwO'></q></dir></style></legend>

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

    <bdo id='pFYwO'></bdo><ul id='pFYwO'></ul>

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

      1. Laravel Auth - 使用 md5 代替集成的 Hash::make()

        Laravel Auth - use md5 instead of the integrated Hash::make()(Laravel Auth - 使用 md5 代替集成的 Hash::make())

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

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

            <bdo id='M4BhO'></bdo><ul id='M4BhO'></ul>

              <tbody id='M4BhO'></tbody>
                <tfoot id='M4BhO'></tfoot>
                  本文介绍了Laravel Auth - 使用 md5 代替集成的 Hash::make()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  所以,我正在为我的网站切换到 laravel.我的旧网站目前拥有大约 500 个用户.每个用户都有一个 md5 哈希作为密码 (duh ^^).

                  So, I'm switching over to laravel for my site. My old site currently holds around 500 users. Each user has a md5 hash attached to them, as the password (duh ^^).

                  当我切换到 laravel 时,我希望使用 Auth::attempt不幸的是,它使用自己的方法来散列密码字符串.我不希望我的所有用户都更改密码,因为我正在切换到 laravel,是否可以让 Auth 类使用 md5 代替,所以我的用户不必切换密码?:)

                  As I'm switching over to laravel, I wish to use the Auth::attempt unfortunately it uses its own method to hash password strings. I don't want all my users to change their password, because I'm switching to laravel, is it possible to make the Auth class use md5 instead, so my users don't have to switch password? :)

                  如果是,谁能告诉我怎么做?

                  If yes, can someone show me how?

                  推荐答案

                  MD5 已经过时了.我建议你不要试图保留它.相反,当用户第一次登录,并且 Auth::attempt 失败时,您应该尝试将他们的密码与数据库进行比较 MD5

                  MD5 is horribly outdated. I recommend that you don't try to keep it. Instead, when a user first logs in, and Auth::attempt fails, you should then try to compare their password to the database as MD5

                  $user = User::where('username', '=', Input::get('username'))->first();
                  
                  if(isset($user)) {
                      if($user->password == md5(Input::get('password'))) { // If their password is still MD5
                          $user->password = Hash::make(Input::get('password')); // Convert to new format
                          $user->save();
                          Auth::login(Input::get('username'));
                      }
                  }
                  

                  这篇关于Laravel Auth - 使用 md5 代替集成的 Hash::make()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    1. <legend id='3MxDa'><style id='3MxDa'><dir id='3MxDa'><q id='3MxDa'></q></dir></style></legend>

                      <small id='3MxDa'></small><noframes id='3MxDa'>

                        <tbody id='3MxDa'></tbody>

                      • <bdo id='3MxDa'></bdo><ul id='3MxDa'></ul>

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