# updraftcentral/0.8.13/templates/dashboard/not-authorised.php

UpdraftCentral Dashboard, version 0.8.13. 29 lines.

- Page: https://pluginprobe.com/plugins/updraftcentral/0.8.13/code/templates/dashboard/not-authorised.php
- Raw: https://pluginprobe.com/plugins/updraftcentral/0.8.13/raw/templates/dashboard/not-authorised.php
- Modified: 2019-06-20T14:59:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/updraftcentral/0.8.13/code/templates/dashboard/not-authorised.php#L10-L20`.

```php
<?php
/**
 * This file displays a link for unauthorised users to logout and login with proper capabilities
 */
if (!defined('UD_CENTRAL_DIR')) die('Security check');

_e('You are logged in, but your user account is not authorised to see this page.', 'updraftcentral');

if (function_exists('WC') && function_exists('woocommerce_login_form')) {
	
	if (!function_exists('updraftcentral_woocommerce_login_form_add_redirect_field')) {
		function updraftcentral_woocommerce_login_form_add_redirect_field() {
			echo '<input type="hidden" name="updraftcentral_redirect_on_wc_login" value="'.esc_attr(get_permalink()).'">';
		}
		add_action('woocommerce_login_form', 'updraftcentral_woocommerce_login_form_add_redirect_field');
	}

	echo do_shortcode('[woocommerce_my_account]');
} else {
	if (function_exists('WC') && false != ($myaccount_page_id = get_option('woocommerce_myaccount_page_id'))) {
		$login_url = get_permalink($myaccount_page_id);
	} else {
		$login_url = wp_login_url(get_permalink());
	}
	?>
	<a href="<?php esc_attr_e($login_url);?>"><?php _e('Go here to log out and log in again.', 'updraftcentral');?></a>
	<?php
}

```
