~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/juju/user/info.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
        defer client.Close()
125
125
        username := c.Username
126
126
        if username == "" {
127
 
                info, err := c.ConnectionCredentials()
 
127
                accountDetails, err := c.ClientStore().AccountByName(
 
128
                        c.ControllerName(), c.AccountName(),
 
129
                )
128
130
                if err != nil {
129
131
                        return err
130
132
                }
131
 
                username = info.User
 
133
                username = accountDetails.User
132
134
        }
133
135
        result, err := client.UserInfo([]string{username}, false)
134
136
        if err != nil {