来自UserInterface类
interface UserInterface {
/**
* The equality comparison should neither be done by referential equality
* nor by comparing identities (i.e. getId() === getId()).
*
* However, you do not need to compare every attribute, but only those that
* are relevant for assessing whether re-authentication is required.
*
* @param UserInterface $user
* @return Boolean
*/
function equals(UserInterface $user);
}
Run Code Online (Sandbox Code Playgroud)
我应该如何实现这一点(" 那些与评估是否需要重新认证相关的那些 ")?那么这是否意味着它在Symfony 2重新认证(用户名/密码)后用户?或者是此功能用户重新进行身份验证.我可以查一下id, username, password, salt吗?Symfony不通过密码检查重新验证用户,这应该足够了吗?