Site nodes should have a "password reset" button that would create a password reset link and/or send a password reset email... Not sure we need a drush task for that, but if that will do it...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

omega8cc’s picture

Great idea!

Will be helpful in our helpdesk integration: nr 2 on my list: http://omega8.cc/lab

~Grace

Anonymous’s picture

I've done some preliminary work on this, created a 'Login reset' task and corresponding provision command etc.. it felt easier that way (through drush etc) because we need to be executing user_pass_reset_url() using account and site parameters from the specific site.. if you can think of an easier way, I'm all ears :)

I'll update when I have something workable. Basically it's all there except, um, the actual code in the provision command's .inc that does all the work :)

anarcat’s picture

So what I think is that this should be part of drush itself. It would help the whole drupal community. It's simply a matter of adding a drush password reset command that shows a password reset URL on stdout and catch that in the frontend.

It's rather silly that we have to wait for the cronjob to get that, but I can't think of any other way right now.

If you want some inspiration on how to create a drush command, look at how clone was implemented and how the install_6.inc stuff works for the password reset.

Anonymous’s picture

Version: 6.x-0.3 » 6.x-0.4-alpha1
Status: Active » Needs review
FileSize
1.67 KB
546 bytes

Forgot about this.

Testing welcome.

anarcat’s picture

Shouldn't this be put straight into drush, at least for the backend stuff?

Anonymous’s picture

Status: Needs review » Needs work

Sorry.

Anyway I've a very simple drush command that's working, here's my git repo.

I haven't hooked this into the frontend yet because I admit I really don't understand Drush all that well and I don't know how to pass a URL to it the way we do with provision. Trying to learn now.

Meantime you can drop login_reset into .drush and run any of the following and it works

cd /var/aegir/drupal-6.14; drush login_reset --uri=http://example.com 
cd /var/aegir/drupal-6.14/sites/example.com; drush login_reset
cd <anywhere>; drush --root=/var/aegir/drupal-6.14 --uri=http://example.com login_reset

Currently it only does a login reset for uid 1, maybe when I understand how to pass proper arguments I will add the option to pass a uid or username as well..

Anonymous’s picture

Latest commit now takes uid as an argument, so it can provide a onetime reset link for other users

adrian’s picture

Status: Needs work » Fixed

reworked it a bit to play nice with the login link code.

committed to head.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 8d7d0a7 on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by adrian:
    #567094 - reset password task
    
    

  • Commit 8d7d0a7 on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by adrian:
    #567094 - reset password task