Ejemplo n.º 1
0
 /**
  * Handle an incoming request.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Closure                 $next
  * @param string                   $group
  *
  * @return mixed
  */
 public function handle($request, Closure $next, $group)
 {
     if (!current_user_is($group)) {
         app()->abort(403, 'You cannot access this page.');
     }
     return $next($request);
 }
Ejemplo n.º 2
0
 function current_user_is_not($role = FALSE)
 {
     return !current_user_is($role);
 }
    ?>
				<h4>I want to unsubscribe</h4>
				<p>Clicking the unsubscribe button handles refunds and cancellations.</p>
				<?php 
    echo do_shortcode('[s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]');
    ?>
				<hr>
				<span><?php 
    echo do_shortcode('[bpProfile /]');
    ?>
</span>
		 <?php 
}
?>
				<?php 
if (!current_user_is(s2member_level1)) {
    ?>
					<p>You have no subscription plan</p>
				<?php 
}
?>
			</div>
			<div class="col-md-3 col-md-offset-1">
			<?php 
//Displays sidebar for members with level one access and above(artists to admin level can see the sidebar)
if (current_user_can(access_s2member_level1)) {
    if (is_active_sidebar('sidebar_primary')) {
        dynamic_sidebar('sidebar_primary');
    }
}
?>