public static function delete_by_user_id($user_id = null)
	{
		if (empty($user_id))
		{
			return true;
		}

		$results = self::all()
			->whereEquals('user_id', $user_id)
			->rows();

		foreach ($results as $result)
		{
			if (!$result->destroy())
			{
				return false;
			}
		}

		return true;
	}
public static function delete_by_user_id($user_id = null)
	{
		if (empty($user_id))
		{
			return true;
		}

		$results = self::all()
			->whereEquals('user_id', $user_id)
			->rows();

		foreach ($results as $result)
		{
			if (!$result->destroy())
			{
				return false;
			}
		}

		return true;
	}
public static function delete_by_user_id ( $ user_id = null ) { if ( empty ( $ user_id ) ) { return true ; } $ results = self :: all ( ) -> whereEquals ( 'user_id' , $ user_id ) -> rows ( ) ; foreach ( $ results as $ result ) { if ( ! $ result -> destroy ( ) ) { return false ; } } return true ; }
Delete a record by User ID

@param   integer  $user_id  User ID
@return  boolean
Delete a record by User ID