Skip to content

Deleting user keeps comments #174

@DPJProgramming

Description

@DPJProgramming

When a user is deleted there is a bug when accessing a recipe page with that user's comments since the system tries to access the author property which doesn't exists anymore.

I covered it up with an if statement

@if (comment.CommentAuthor != null)
{

@comment.CommentAuthor.UserName

}

this allows the comment to be displayed without the user name displayed above it, but in the future, no one can delete or modify that comment since the author doesn't exists anymore. It might be best to delete a user's comments when a user is deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions