This forum is archived. Posts are preserved for historical reference. For current help, join us on Discord.

Manually Add User redirects and logs out admin

In UserSpice 4.3 and Below · Started by pringletech on 2018-06-07 3:24 am · 17119 views · 6 replies

When manually adding a user successfully I am logged out as my user and logged in as the newly created one. I would prefer to stay logged in as my admin users and stay on the admin_users.php page.

Is what I am seeing the designed workflow? Can I stay logged in and go back to the admin users list?
This isn't by design that @mudmin and I know about...we however have both saw this before. I'm assuming this is happening on localhost?

Brandin.
IIRC there is something in the custom login scripts that is doing that. Try commenting out everything in usersc/scripts/custom_login_script.php and see what happens.
This is not a local install, it is online and in production

There was one line not commented in usersc/scripts/custom_login_script.php. But when I commented it out I get the same results.
Redirect::to($us_url_root.'users/account.php');

The only reference to account.php in the admin-users.php page is line 63. I changed it to go to admin-users.php but no luck. It was a longshot but worth a 2-minute test.
Redirect::to('admin_users.php?err=You+are+now+cloaked!');

It would need to be some action that occurs during the post-so check everything that happens during the POST on admin_users.php.
I think I found the file that was causing this behavior. I restored this file from the full download of the master version and the behavior is gone.

/usersc/script/custom_login_script.php

Thanks for your responses.
I just came across this; looks like conflict between registration requiring email activation and manual user creation.

When manually creating, the following line is called in admin_users.php, I commented it out which then doesn't log in the newly created user.

Hopefully no other ill effects from this approach  :s

include($abs_us_root.$us_url_root.'usersc/scripts/during_user_creation.php');