WIP
This commit is contained in:
@ -22,6 +22,7 @@ use TheTempusProject\Plugins\Comments as CommentPlugin;
|
||||
use TheTempusProject\Plugins\Blog as BlogPlugin;
|
||||
use TheTempusProject\Plugins\Contact as ContactPlugin;
|
||||
use TheTempusProject\Canary\Bin\Canary as Debug;
|
||||
use TheTempusProject\Bedrock\Functions\Input;
|
||||
|
||||
class Home extends AdminController {
|
||||
public static $user;
|
||||
@ -77,6 +78,11 @@ class Home extends AdminController {
|
||||
$users = Views::simpleView( 'admin.dashboard.users', self::$user->recent( 5 ) );
|
||||
Components::set( 'userDash', $users );
|
||||
|
||||
if ( Input::exists( 'submit' ) ) {
|
||||
$results = Views::simpleView( 'admin.dashboard.users', self::$user->search( Input::post('searchTerm') ) );
|
||||
Components::set( 'searchResults', $results );
|
||||
}
|
||||
|
||||
Views::view( 'admin.dashboard.dash' );
|
||||
}
|
||||
}
|
||||
|
@ -104,6 +104,10 @@ class Usercp extends Controller {
|
||||
$userPrefs = App::$activePrefs;
|
||||
if ( Input::exists( 'submit' ) ) {
|
||||
$fields = $prefs->convertFormToArray( true, false );
|
||||
// @TODO now i may need to rework the form checker to work with this....
|
||||
// if (!Forms::check('userPrefs')) {
|
||||
// Issues::add( 'error', [ 'There was an error with your request.' => Check::userErrors() ] );
|
||||
// }
|
||||
self::$user->updatePrefs( $fields, App::$activeUser->ID );
|
||||
Issues::add( 'success', 'Your preferences have been updated.' );
|
||||
// if the image upload fails, need to fall back on original
|
||||
|
Reference in New Issue
Block a user