注销时会向会员清除电子邮件

时间:2018-01-30 05:44:29

标签: php silverstripe

我已经围绕SilverStripe框架(3.6)构建了一个平台,并且发现了一个我似乎无法复制的用户案例的奇怪之处。当用户注销时,他们的电子邮件将从数据库中清除。该成员仍然存在,如果我在管理员的电子邮件地址中回写,它将恢复正常。

我已将onBeforeWrite()添加到Member扩展,并在写入之前捕获了堆栈跟踪和对象。成员对象写入没有设置电子邮件,我认为它在编写时会清除它。那时我还做了一个堆栈跟踪,但它主要是核心框架文件:

[{
    "file": "\/framework\/core\/Object.php",
    "line": 1060,
    "function": "onBeforeWrite",
    "class": "PlatformMemberExtension",
    "object": {
        "class": "PlatformMemberExtension"
    },
    "type": "->",
    "args": [null, null, null, null, null, null, null]
}, {
    "file": "\/framework\/model\/DataObject.php",
    "line": 1105,
    "function": "extend",
    "class": "Object",
    "object": {
        "destroyed": false,
        "class": "Member"
    },
    "type": "->",
    "args": ["onBeforeWrite", null]
}, {
    "file": "\/framework\/security\/Member.php",
    "line": 976,
    "function": "onBeforeWrite",
    "class": "DataObject",
    "object": {
        "destroyed": false,
        "class": "Member"
    },
    "type": "->",
    "args": []
}, {
    "file": "\/framework\/model\/DataObject.php",
    "line": 1220,
    "function": "onBeforeWrite",
    "class": "Member",
    "object": {
        "destroyed": false,
        "class": "Member"
    },
    "type": "->",
    "args": []
}, {
    "file": "\/framework\/model\/DataObject.php",
    "line": 1372,
    "function": "preWrite",
    "class": "DataObject",
    "object": {
        "destroyed": false,
        "class": "Member"
    },
    "type": "->",
    "args": []
}, {
    "file": "\/framework\/security\/Member.php",
    "line": 655,
    "function": "write",
    "class": "DataObject",
    "object": {
        "destroyed": false,
        "class": "Member"
    },
    "type": "->",
    "args": []
}, {
    "file": "\/framework\/security\/Security.php",
    "line": 410,
    "function": "logOut",
    "class": "Member",
    "object": {
        "destroyed": false,
        "class": "Member"
    },
    "type": "->",
    "args": []
}, {
    "file": "\/framework\/control\/RequestHandler.php",
    "line": 288,
    "function": "logout",
    "class": "Security",
    "object": {
        "class": "PlatformSecurity"
    },
    "type": "->",
    "args": [{}]
}, {
    "file": "\/framework\/control\/Controller.php",
    "line": 202,
    "function": "handleAction",
    "class": "RequestHandler",
    "object": {
        "class": "PlatformSecurity"
    },
    "type": "->",
    "args": [{}, "logout"]
}, {
    "file": "\/framework\/control\/RequestHandler.php",
    "line": 200,
    "function": "handleAction",
    "class": "Controller",
    "object": {
        "class": "PlatformSecurity"
    },
    "type": "->",
    "args": [{}, "logout"]
}, {
    "file": "\/framework\/control\/Controller.php",
    "line": 158,
    "function": "handleRequest",
    "class": "RequestHandler",
    "object": {
        "class": "PlatformSecurity"
    },
    "type": "->",
    "args": [{}, {}]
}, {
    "file": "\/framework\/control\/Director.php",
    "line": 385,
    "function": "handleRequest",
    "class": "Controller",
    "object": {
        "class": "PlatformSecurity"
    },
    "type": "->",
    "args": [{}, {}]
}, {
    "file": "\/framework\/control\/Director.php",
    "line": 149,
    "function": "handleRequest",
    "class": "Director",
    "type": "::",
    "args": [{}, {}, {}]
}, {
    "file": "\/framework\/main.php",
    "line": 191,
    "function": "direct",
    "class": "Director",
    "type": "::",
    "args": ["\/Security\/logout", {}]
}]

我的代码中的文件(覆盖核心功能)中没有一个覆盖它正在调用的函数,也没有设置电子邮件。

我可以做一些其他的调试,或者我的堆栈跟踪中的某些内容可能导致我遇到问题吗?

0 个答案:

没有答案