Sometime since 3/20 it seems that the -u command line option to drush.php stopped working - $user is left as anonymous even though a different userid was set. This is causing me lots of immediate grief as I'm using drush to make calls to node_delete which checks access.
Comments
Comment #1
moshe weitzman commentedComment #2
adrian commentedworks fine here :
Text string too.
[?
Moya:~ adrian$ php /Users/adrian/Projects/hosting/drush/drush.php --root='/Users/adrian/Projects/hosting/platforms/DRUPAL-6' --uri='http://includetest.dev' -u admin status
Drupal Root : /Users/adrian/Projects/hosting/platforms/DRUPAL-6
Drupal version : 6.10
Site Path : sites/includetest.dev
Site URI : http://includetest.dev
Database Driver : mysql
Database Hostname : localhost
Database Username : site_1700
Database Name : site_1700
Database Name : V4mtRWD4TU
Database : Connected
Drupal Bootstrap : Successful
Drupal User : admin
?]
I think this is related to the default bootstrap level for commands being BOOTSTRAP_DRUPAL_FULL , and the login happens in DRUPAL_BOOTSTRAP_LOGIN.
Comment #3
adrian commentedI've changed the default bootstrap phase to DRUSH_BOOTSTRAP_DRUPAL_LOGIN
if -u isn't specified, it will log in as anon
committed.