flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.36k stars 834 forks source link

Admin unable to edit user profile: check box for reset password doesn't work. #1686

Closed PeopleInside closed 5 years ago

PeopleInside commented 5 years ago

Bug Report

Current Behavior

Admin are unable to help the user to reset his password

  1. Admin is logged and need help an user to reset his password.
  2. Load admin profile .../u/admin
  3. Load user profile by replacing admin with user username: .../u/username
  4. From the user profile press Controls
  5. Edit User 6 Set new password

No option to change the password, no email sent to the user.

Expected Behavior

Email is sent to the user and maybe if this is not possible because email are refused admin should have a way to generate a temp password for the user.

Screenshots

Environment

Possible Solution

  1. admin should choose if email the user a new password but will be useful also have the possibility to reset password manually. User can be unable to receive the email with password and if the admin cannot receive the email?

Additional Context

When the check box for change user password is checked and setting saved user are not reeving reset email.

Brightside56 commented 5 years ago

Same issue

jordanjay29 commented 5 years ago

Confirmed.

Beta 8.x Beta 8.x

Beta 7.x Beta 7.x

PeopleInside commented 5 years ago

The fix did not work for me. Firefox.

luceos commented 5 years ago

@PeopleInside can you explain how you tested that, also please include the composer.json with which you tested.

PeopleInside commented 5 years ago

Umh replaced the fixed JS files than cleared cache from Flarum backend. Loaded my profile on the forum, changed the username in the URL with a profile of user to set a new password. When i check the box for change password nothing happen just checked. Also if i save nothing happen. Tested also on incognito mode.


{
    "name": "flarum/flarum",
    "description": "Delightfully simple forum software.",
    "type": "project",
    "keywords": ["forum", "discussion"],
    "homepage": "https://flarum.org/",
    "license": "MIT",
    "authors": [
        {
            "name": "Toby [...]",
            "email": "[...]"
        },
        {
            "name": "Franz [...]",
            "email": "[...]"
        }
    ],
    "support": {
        "issues": "https://github.com/flarum/core/issues",
        "source": "https://github.com/flarum/flarum",
        "docs": "https://flarum.org/docs/"
    },
    "require": {
        "flagrow/upload": "*",
        "flarum/akismet": "^0.1.0@beta",
        "flarum/approval": "^0.1.0",
        "flarum/auth-facebook": "^0.1.0",
        "flarum/auth-github": "^0.1.0",
        "flarum/auth-twitter": "^0.1.0",
        "flarum/bbcode": "^0.1.0",
        "flarum/core": "^0.1.0",
        "flarum/emoji": "^0.1.0",
        "flarum/flags": "^0.1.0",
        "flarum/lang-english": "^0.1.0",
        "flarum/likes": "^0.1.0",
        "flarum/lock": "^0.1.0",
        "flarum/markdown": "^0.1.0",
        "flarum/mentions": "^0.1.0",
        "flarum/pusher": "^0.1.0",
        "flarum/statistics": "^0.1.0",
        "flarum/sticky": "^0.1.0",
        "flarum/subscriptions": "^0.1.0",
        "flarum/suspend": "^0.1.0",
        "flarum/tags": "^0.1.0",
        "fof/links": "^0.1.1",
        "fof/user-bio": "^0.1.1",
        "nearata/lang-italian": "v0.1.0-beta.8.2",
        "reflar/twofactor": "0.1.0-beta.4.2"
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "beta",
    "prefer-stable": true
}
luceos commented 5 years ago

@PeopleInside Marco are you seeing any errors in the console?

On chrome it now works.

matteocontrini commented 5 years ago

@PeopleInside did you replace the "dist" file as well?

PeopleInside commented 5 years ago

@matteocontrini no, i do not see the dist file to replace in the fix. Maybe i have the issue because just updated the JS file i see in this fix.

luceos commented 5 years ago

@PeopleInside I/we do not commit the dist because @tobscure has a bot that recompiles it every time when a commit to master happens. Only the files in dist are used to generate the js files you see in the public/assets directory. Please try to overwrite the dist files, or better yet set up an actual dev environment.

Closed unless given more evidence.

PeopleInside commented 5 years ago

Umh i have no idea what override.. where the dist files is? If i cannot try to fix manually i will wait the Flarum update (next version). Thank you.

UPDATE: found the dist folder, i will see. thanks. Now works, fixed thank you!

luceos commented 5 years ago

@peopleinside thanks for all your hard work. I'm glad you now also confirmed the fix as valid 👌

PeopleInside commented 5 years ago

No hard work @luceos but thank you very much for your fix and always your kind words. 👍

luceos commented 5 years ago

Based on feedback by @franzliedke a change has to be implemented, the initial state of the checkbox is unchecked in all situations, so it makes sense to reduce complexity in this component further, the onchange listener takes care of setting the prop already, so the value method might be unecessary.