Doctrine & Covenants 64:8-14
8 My disciples, in days of old, sought occasion against one another and forgave not one another in their hearts; and for this evil they were afflicted and sorely chastened.
9 Wherefore, I say unto you, that ye ought to forgive one another; for he that forgiveth not his brother his trespasses standeth condemned before the Lord; for there remaineth in him the greater sin.
10 I, the Lord, will forgive whom I will forgive, but of you it is required to forgive all men.
11 And ye ought to say in your hearts—let God judge between me and thee, and reward thee according to thy deeds.
12 And him that repenteth not of his sins, and confesseth them not, ye shall bring before the church, and do with him as the scripture saith unto you, either by commandment or by revelation.
13 And this ye shall do that God may be glorified—not because ye forgive not, having not compassion, but that ye may be justified in the eyes of the law, that ye may not offend him who is your lawgiver—
14 Verily I say, for this cause ye shall do these things.