While coding this I also noticed we should add successes and errors to the admin form. No need for validation in my opinion, but we should be displaying success codes on this page.
Also, there is an issue with the Redirect:: call on after_logout or whatever. It does the redirect, but it quickly flashes an error and then obviously I can't see it because it redirects you. I couldn't figure out what it was or replicate it without the redirect occurring...It only shows up when the redirect happens on logout.
This script repurposes force_pr in settings to be the force_pr definition when creating a new user from admin_users.php.
I'm not posting the whole files (yet) because you have some changes above to make
-Add errors and successes to admin.php, you need the PHP and the HTML portion
On admin.php:
-Replace the force_pr PHP in POST to this:
http://pasted.co/9e8ea755
-Replace the force_pr HTML to this:
http://pasted.co/6cd0c8b4
On admin_user.php:
Replace the block user PHP with this:
http://pasted.co/ec0382a4
Add this HTML under the block user:
http://pasted.co/04264c09
At the bottom of the PHP on header.php (under the track_guest) add:
http://pasted.co/cdf7ad3b
And add this to your add user fields whenever you have this (if you use my new user management stuff, or on the old page)
Code:
'force_pr' => $settings->force_pr,
I put it under the vericode.
SQL:
http://pasted.co/fb982bda
Let me know if you have any issues!
...update....5 hours later because I knew I'd forget something. You need to reset force_pr when you change the password! Duh! lol
Replace the update on line 195 of
to:
Code:
$user->update(array('password' => $new_password_hash,'force_pr' => 0,),$user->data()->id);
And add this to the fields array on
Code:
forgot_password_reset.php
: