小编par*_*thi的帖子

Symfony 4 通过用户名更改密码 - 电子邮件不能为空

介绍

我一直在试图弄清楚如何创建一个由用户名值控制的重置密码表单。

错误

Path        Message                           Invalid value     Violation
data.email  This value should not be blank.   null 



ConstraintViolation {#945 ?
  -message: "This value should not be blank."
  -messageTemplate: "This value should not be blank."
  -parameters: [?]
  -plural: null
  -root: Form {#620 ?}
  -propertyPath: "data.email"
  -invalidValue: null
  -constraint: NotBlank {#477 …}
  -code: "c1051bb4-d103-4f74-8988-acbcafc7fdc3"
  -cause: null
}
Run Code Online (Sandbox Code Playgroud)

什么预期

使用新密码更新我的用户对象。

我的代码

忘记控制器.php

我知道这可能不是获取密码的正确方法,但是搜索 Symfony 4 忘记密码表单会显示与我的版本无关的 symfony2.4 帖子

    <?php
        namespace App\Controller\User;

        use App\Entity\User;
        use App\Form\User\ChangePasswordType;
        use App\Repository\UserRepository;
        use Symfony\Bundle\FrameworkBundle\Controller\Controller;
        use Symfony\Component\HttpFoundation\Request;
        use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;

        class …
Run Code Online (Sandbox Code Playgroud)

php symfony symfony4

4
推荐指数
1
解决办法
8586
查看次数

如何在PHP Laravel 5中配置Amazon SES SMTP?

我已经在PHP Laravel5项目中集成了亚马逊SES,但我很难发送电子邮件,因为我收到此错误,

Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 250 but got code "530", with message "530 Authentication required" 
Run Code Online (Sandbox Code Playgroud)

任何人都可以告诉我如何配置亚马逊SES ..

php amazon-ses laravel-5

3
推荐指数
2
解决办法
1万
查看次数

标签 统计

php ×2

amazon-ses ×1

laravel-5 ×1

symfony ×1

symfony4 ×1