Skip to content

Instantly share code, notes, and snippets.

@maxparm
Created June 15, 2011 23:17
Show Gist options
  • Select an option

  • Save maxparm/1028364 to your computer and use it in GitHub Desktop.

Select an option

Save maxparm/1028364 to your computer and use it in GitHub Desktop.
User Helper
<!doctype html>
<html>
<head>
<?php echo $this->html->charset();?>
<title>Blog Example</title>
</head>
<body>
<p>User is <?=$this->user->connected()?'':'not'?> connected</p>
</body>
</html>
<?php
namespace app\extensions\helper;
use lithium\security\Auth;
class User extends \lithium\template\helper {
public function connected() {
return Auth::check('member', $this->_context->_config['request']);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment