For the sake of doing good things i believe is better to use the second operation, taking the name in an variable ant connnect+/and at client_infochanged().
It is extremely unlikely that this method is better. 99% of use cases, simply getting the user name when you need the user name is the best method.