how to access $user from commandline? I'd like to access $user from the commandline to see what properties are available on it.  I could sdpm($user) in my code and go inspect it in my browser, but isn't there a way I can inspect it right from my terminal?

It looks like drush php could be helpful here, according to http://blog.damiankloip.net/2015/drush-php, but when I use it and do dump -a $user I get 'Unknown variable: $user'.  That's probably obvious, so I probably need to load $user into the repl first (I'm guessing)... but how?  That blog post shows how to load objects in D8, but how would I do this in D7 for $user???
You need to define the $user variable first. You can run the drush command as a particular user by specifying --user on the command line:

drush --user='admin' ev 'global $user; print_r($user);'


If you don't specify a user, drush runs as anonymous by default.

Or, you can do it like this:

drush ev '$user = user_load_by_name("admin"); print_r($user);'


It will display this:

stdClass Object
(
    [uid] =&gt; 1
    [name] =&gt; admin
    [pass] =&gt; *****
    [mail] =&gt; info@example.com
    [theme] =&gt; 
    [signature] =&gt; 
    [signature_format] =&gt; filtered_html
    [created] =&gt; 1443708895
    [access] =&gt; 1515415027
    [login] =&gt; 1515411954
    [status] =&gt; 1
    [timezone] =&gt; Europe/London
    [language] =&gt; 
    [picture] =&gt; 0
    [init] =&gt; info@example.com
    [data] =&gt; 
    [uuid] =&gt; f6800524-c092-4abc-abcd-f71d091623cd
    [roles] =&gt; Array
        (
            [2] =&gt; authenticated user
        )

    [force_password_change] =&gt; 0
)