Repository: conan-io/conan

Issue:
Non interactive mode also prevents prompt from `conan user`
The new non interactive mode also prevents the prompt from `conan user <name> -p`. This is not what is specified in the documentation. (And also not what was originally implemented.)

I hope the prompt can be re-enabled for this particular case. If not, the documentation should be changed.

Oh, and a purely cosmetic remark: the non interactive error only appears after the prompt has been displayed.

Using Conan 1.2 on Windows 7.

- [x] I've read the [CONTRIBUTING guide](https://raw.githubusercontent.com/conan-io/conan/develop/.github/CONTRIBUTING.md).
- [x] I've specified the Conan version, operating system version and any tool that can be relevant.
- [x] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.



Discussion:

Patch:
diff --git a/conans/client/userio.py b/conans/client/userio.py
index b42d8e39d..c64d67ff9 100644
--- a/conans/client/userio.py
+++ b/conans/client/userio.py
@@ -40,6 +40,7 @@ class UserIO(object):
     def request_login(self, remote_name, username=None):
         """Request user to input their name and password
         :param username If username is specified it only request password"""
+        self._raise_if_non_interactive()
         user_input = ''
         while not username:
             try:


Test patch:
diff --git a/conans/test/command/user_test.py b/conans/test/command/user_test.py
index 86d7d15c4..c059b50e2 100644
--- a/conans/test/command/user_test.py
+++ b/conans/test/command/user_test.py
@@ -158,5 +158,10 @@ class ConanLib(ConanFile):
         error = conan.run('user -p -r default lasote', ignore_error=True)
         self.assertTrue(error)
         self.assertIn('ERROR: Conan interactive mode disabled', conan.user_io.out)
+        self.assertNotIn("Please enter a password for \"lasote\" account:", conan.out)
         conan.run("user")
         self.assertIn("Current 'default' user: None", conan.user_io.out)
+        error = conan.run("user -p", ignore_error=True)
+        self.assertTrue(error)
+        self.assertIn('ERROR: Conan interactive mode disabled', conan.out)
+        self.assertNotIn("Remote 'default' username:", conan.out)