Check if the user has enough credits.
Check if the user has enough credits.Checks if the current user has enough credits, presumably as a preamble to charging the user's account. Don't forget that credits are a constantly diminishing quantity. Always check if a user can pay, but do it right before charging the user. Otherwise, the user may be able to pay now, but not when you actually call usr_chargecredits().