Yes it has to be ! Because if the order of an element is equal to order of the group then such an element will surely be the generator because order of an element says the periodicity. For an element to be called as generator, its periodicity should be order of group, otherwise all elements can't be generated