mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Fixing email action when the user is not authenticated
This commit is contained in:
parent
4a95f697dd
commit
39ba3e1ac1
@ -50,9 +50,9 @@ namespace Orchard.Email.Rules {
|
||||
if (recipient == "owner") {
|
||||
var content = context.Tokens["Content"] as IContent;
|
||||
if (content.Has<CommonPart>()) {
|
||||
var owner = content.As<CommonPart>().Owner.ContentItem;
|
||||
if (owner != null && owner.Record != null) {
|
||||
_messageManager.Send(owner.Record, MessageType, "email", properties);
|
||||
var owner = content.As<CommonPart>().Owner;
|
||||
if (owner != null && owner.ContentItem != null && owner.ContentItem.Record != null) {
|
||||
_messageManager.Send(owner.ContentItem.Record, MessageType, "email", properties);
|
||||
}
|
||||
_messageManager.Send(
|
||||
SplitEmail(owner.As<IUser>().Email), MessageType, "email", properties);
|
||||
|
Loading…
Reference in New Issue
Block a user