concrete/src/User/PrivateMessage/Limit.php
public static function isOverLimit($uID)
    {
        if (Config::get('concrete.user.private_messages.throttle_max') == 0) {
            return false;
        }
        if (Config::get('concrete.user.private_messages.throttle_max_timespan') == 0) {
            return false;
        }
        $db = Loader::db();
        $dt = new DateTime();
        $dt->modify('-'.Config::get('concrete.user.private_messages.throttle_max_timespan').' minutes');
        $v = array($uID, $dt->format('Y-m-d H:i:s'));
        $q = "SELECT COUNT(msgID) as sent_count FROM UserPrivateMessages WHERE uAuthorID = ? AND msgDateCreated >= ?";
        $count = $db->getOne($q, $v);

        if ($count > Config::get('concrete.user.private_messages.throttle_max')) {
            self::notifyAdmin($uID);

            return true;
        } else {
            return false;
        }
    }
public static function isOverLimit($uID)
    {
        if (Config::get('concrete.user.private_messages.throttle_max') == 0) {
            return false;
        }
        if (Config::get('concrete.user.private_messages.throttle_max_timespan') == 0) {
            return false;
        }
        $db = Loader::db();
        $dt = new DateTime();
        $dt->modify('-'.Config::get('concrete.user.private_messages.throttle_max_timespan').' minutes');
        $v = array($uID, $dt->format('Y-m-d H:i:s'));
        $q = "SELECT COUNT(msgID) as sent_count FROM UserPrivateMessages WHERE uAuthorID = ? AND msgDateCreated >= ?";
        $count = $db->getOne($q, $v);

        if ($count > Config::get('concrete.user.private_messages.throttle_max')) {
            self::notifyAdmin($uID);

            return true;
        } else {
            return false;
        }
    }
public static function isOverLimit ( $ uID ) { if ( Config :: get ( 'concrete.user.private_messages.throttle_max' ) == 0 ) { return false ; } if ( Config :: get ( 'concrete.user.private_messages.throttle_max_timespan' ) == 0 ) { return false ; } $ db = Loader :: db ( ) ; $ dt = new DateTime ( ) ; $ dt -> modify ( '-' . Config :: get ( 'concrete.user.private_messages.throttle_max_timespan' ) . ' minutes' ) ; $ v = array ( $ uID , $ dt -> format ( 'Y-m-d H:i:s' ) ) ; $ q = "SELECT COUNT(msgID) as sent_count FROM UserPrivateMessages WHERE uAuthorID = ? AND msgDateCreated >= ?" ; $ count = $ db -> getOne ( $ q , $ v ) ; if ( $ count > Config :: get ( 'concrete.user.private_messages.throttle_max' ) ) { self :: notifyAdmin ( $ uID ) ; return true ; } else { return false ; } }
checks to see if a user has exceeded their limit for sending private messages.

@param int $uID

@return bool
checks to see if a user has exceeded their limit for sending private messages .