Bananas have the potential to both cause and/or cure constipation. Since babanas contain fiber and potassium, those with constipation are advised to use ripe bananas ; as these ingredients in a ripe banana help increase intestinal movements. Furthermore ripe bananas contain an enzyme which helps the prevention of constipation. On the other hand if you have a hard time dealing with diarrhea, it is recommended to use un-ripe bananas. Un-ripe bananas are high in starch which takes a long time to be digested. Also, note that bananas contain a lot of electrolytes and in cases of  diarhea one encounters loss of electrolytes and un-ripe bananas can replace this lack of electrolytes to a good extent.