Bedrock 2.4.1-10 now includes a new option of the <include> tag. The new --optional argument, will prevent Bedrock from throwing an exception if your include file is not found. This might be useful for those situations where you might want to conditionally include a file.
<include:foo --optional>
There a couple of old school ways of achieving the same thing.
<if -e --file ($config.INCLUDE_DIR + '/foo.inc')>
<include:foo>
</if>
or
<try>
<include:foo>
<catch>
</try>
Either way you slice it, the old school way seems forced. The --optional tag is admittedly syntactic sugar, but a welcome sweetener!
Sunday, February 1, 2015
Cookieless Sessions - Automatically Login Your Users
The default Bedrock persistence store, implemented via the $session object has the ability to create a token (session identifier) you can use to automatically log your users into your applications.
This is a useful feature for resetting passwords and perhaps creating convenience links for fast access to application specific pages that would normally require a user to login to the application. Here's how it works...
This is a useful feature for resetting passwords and perhaps creating convenience links for fast access to application specific pages that would normally require a user to login to the application. Here's how it works...
Subscribe to:
Posts (Atom)