intersynergy-login-plugin.php
/**
     * Redirects the user to the correct page depending on whether he / she
     * is an admin or not.
     *
     * @param string $redirect_to An optional redirect_to URL for admin users
     */
Redirects the user to the correct page depending on whether he / she
is an admin or not.

@param string $redirect_to An optional redirect_to URL for admin users
Redirects the user to the correct page depending on whether he / she is an admin or not . @param string $redirect_to An optional redirect_to URL for admin users
private function redirect_logged_in_user($redirect_to = null)
    {
        $user = wp_get_current_user();
        if (user_can($user, 'manage_options')) {
            if ($redirect_to) {
                wp_safe_redirect($redirect_to);
            } else {
                wp_redirect(admin_url());
            }
        } else {
            wp_redirect(home_url($this->pageSlug['member-account']));
        }
    }
private function redirect_logged_in_user ( $ redirect_to = null ) { $ user = wp_get_current_user ( ) ; if ( user_can ( $ user , 'manage_options' ) ) { if ( $ redirect_to ) { wp_safe_redirect ( $ redirect_to ) ; } else { wp_redirect ( admin_url ( ) ) ; } } else { wp_redirect ( home_url ( $ this -> pageSlug [ 'member-account' ] ) ) ; } }
Redirects the user to the correct page depending on whether he / she
 is an admin or not.
Redirects the user to the correct page depending on whether he / she is an admin or not .