Welding one or both pin ends is a secure way of retaining the pin in a hinge. If both ends are welded, you must make sure that the end knuckles of the hinge are from the same leaf so the hinge does not bind.