Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change passwd via CLI #119

Closed
idotobi opened this issue Jun 5, 2017 · 2 comments
Closed

Cannot change passwd via CLI #119

idotobi opened this issue Jun 5, 2017 · 2 comments
Assignees
Labels

Comments

@idotobi
Copy link

idotobi commented Jun 5, 2017

When I try changing the password of one of my accounts I get the following Error:

$ bin/plugin login passwd
Changing User Password

Enter a username: admin
PHP Fatal error:  Class 'Grav\Plugin\Console\Grav' not found in /var/www/html/mysite.net/user/plugins/logi/cli/ChangePasswordCommand.php on line 135
  • I'm runing an up-to-date Debian GNU/Linux 8 (jessie)

  • My php version is PHP 5.6.30

  • the login plugin is up-to-date

    $ bin/gpm info login
    
    GPM Releases Configuration: Stable
    
    Found package 'login' under the 'Plugins' section
    
    Login [login]
    -------------
    Enables user authentication and login screen.
    
    Author      : Team Grav <devs@getgrav.org> <http://getgrav.org>
    Version     : 2.3.1
    

Apart from that, thanks for a great plugin!

@flaviocopes flaviocopes added the bug label Jun 5, 2017
@flaviocopes flaviocopes self-assigned this Jun 5, 2017
@flaviocopes
Copy link
Contributor

Thanks for reporting, looks like a bug introduced between Grav 1.2.4 and 1.3.0-rc.1

@idotobi
Copy link
Author

idotobi commented Jun 11, 2017

The patch you did was already present in my version.

For me the following change in user/plugin/login/cli/ChangePasswordCommand.php resolved the problem:

@@ -1,6 +1,7 @@
 <?php
 namespace Grav\Plugin\Console;
 
+use Grav\Common\Grav;
 use Grav\Console\ConsoleCommand;
 use Grav\Common\File\CompiledYamlFile;
 use Grav\Common\User\User;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants