test
This commit is contained in:
@@ -13,16 +13,16 @@ class Wiaas_Authentication {
|
||||
|
||||
public static function init() {
|
||||
// authenticate current user
|
||||
add_action('determine_current_user', array(__CLASS__, 'authenticate_current_user'), 999);
|
||||
# add_action('determine_current_user', array(__CLASS__, 'authenticate_current_user'), 999);
|
||||
|
||||
// authenticates user on login
|
||||
add_filter( 'authenticate', array( __CLASS__, 'authenticate_user_on_login' ), 999, 3);
|
||||
# add_filter( 'authenticate', array( __CLASS__, 'authenticate_user_on_login' ), 999, 3);
|
||||
|
||||
// retrieve preferred user role for user
|
||||
add_filter('get_user_metadata', array(__CLASS__, 'maybe_filter_user_roles'), 10, 3);
|
||||
|
||||
// redirect to dashboard after login
|
||||
add_filter( 'login_redirect', array( __CLASS__, 'login_redirect' ) );
|
||||
# add_filter( 'login_redirect', array( __CLASS__, 'login_redirect' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,6 +113,8 @@ class Wiaas_Authentication {
|
||||
|
||||
if ($user_id !== 0 && $user_id !== self::SUPER_ADMIN_USER_ID && $meta_key === $wpdb->get_blog_prefix() . 'capabilities') {
|
||||
|
||||
return array( array( 'administrator' => true ) );
|
||||
|
||||
// import organization functions (during user authentication it is not yet loaded)
|
||||
require_once dirname( __FILE__ ) . '/user/wiaas-organization-functions.php';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user