I didn't find out which release changes caused the problem.
But yesterday, I finally got the answar. When I changed the "beforeFilter"
tot "beforeRender", it worked again!
Thanks anyway for the help!
Op donderdag 22 oktober 2015 12:13:17 UTC+2 schreef Rob Maurer:
>
&
There are changes made with each minor release that can affect your app;
start here (http://book.cakephp.org/2.0/en/appendices.html) to see them
listed all in one place. - Rob Maurer
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You
Since my update from CakePhp 2.3. to CakePhp 2.7., my beforeFilter() action
in pluginAppController doesn't work anymore:
array(
'loginAction' => array(
'plugin' => 'coaster_cms',
'controller' => 'users',
'action'
Hi,
I don't understand why my AppController beforefilter is called after the
beforeFilter of the controller.
I have 3 Controllers :
AppControllerProjectAppControllerProjectStpController. Each with
beforeFilter function.
*\app\Controller\Project\ProjectAppController.php* (line *6
to add some code to the beforeFilter() of the AppController
which, under certain conditions, should stop the current REST request and
print a different response.
Say I do a GET request to the customers controller...
http://localhost/cakephp/customers.json
This returns what I would expect, my
ahh! perfect :) thanks I will use this instead :) Much nicer to have it in
the AppController cause I can use models :D
Thanks!!
On Tuesday, September 16, 2014 8:03:50 PM UTC+10, José Lorenzo wrote:
Exceptions are rendered as json or xml automatically, if you have the
RequestHandler
customers controller / model..
Router::mapResources('customers');
I want to add some code to the beforeFilter() of the AppController which,
under certain conditions, should stop the current REST request and print a
different response.
Say I do a GET request to the customers controller
to halt a REST request after it has already been primed by the
default mapResources route feature? In the app/Config/routes.php I have
the following route for my customers controller / model..
Router::mapResources('customers');
I want to add some code to the beforeFilter
have the following route for my customers controller / model..
Router::mapResources('customers');
I want to add some code to the beforeFilter() of the AppController which,
under certain conditions, should stop the current REST request and print a
different response.
Say I do a GET request
in the
beforeFilter of my controller.
ie controller:
public function beforeFilter(){
$desc = 'test description text';
$this-set('meta_desc', $desc );
}
and then calling it in my layout file.
!DOCTYPE html
?php
if(!isset($meta_desc)) {
$meta_desc = 'House For Sale
/img/icon.png/
im guessing that the best way to do this is by setting the values in the
beforeFilter of my controller.
ie controller:
public function beforeFilter(){
$desc = 'test description text';
$this-set('meta_desc', $desc );
}
and then calling it in my
for a share button
eg:
meta property=og:description content=description text/meta
property=og:image content=http://www.myurl.co.uk/img/icon.png/
im guessing that the best way to do this is by setting the values in the
beforeFilter of my controller.
ie controller:
public
{
function beforeFilter() {
parent::beforeFilter();
throw new ForbiddenException();
}
}
But the beforeFilter() hook is not getting called.
Regards.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message
Hey
Could you show a snippet of your code so we can see how you're doing it?
On 2 May 2014 08:02, Vann Mardy vannmard...@gmail.com wrote:
Dear All,
i want to check user login beforeFilter , but i have one problem with
redirect page (adminstrators/login) in AppController beforeFilter
Dear All,
i want to check user login beforeFilter , but i have one problem with
redirect page (adminstrators/login) in AppController beforeFilter.
it show this message The page isn't redirecting properly. please help me.
thanks you!
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Greetings!
I am using the Alaxos ACL plugin - which, is pretty awesome. The only
issue I am having, and I haven't had on any of my other applications is
with beforeFilter().
*In my AppController I have the following:*
function beforeFilter() { parent::beforeFilter();
$this-Auth-allow
);
Since this action uses a view of keyhole my before filter was not
allowing the page. Simply adding keyhole to me beforefilter did the trick:
function beforeFilter() { parent::beforeFilter();
$this-Auth-allow('view', *'keyhole'*); }
Hope this helps others.
--
Like Us on FaceBook https
Please correct me if I'm not.
I noticed the call happens twice when I include a call to
parent::beforeFilter() in my controller's beforeFilter method which puts an
overhead on the app.
On Wednesday, 13 March 2013 20:27:36 UTC+1, AD7six wrote:
CakePHP calls your controller beforeFilter
I just figured this out.
I had an element in the layout which has a line with a requestAction()
call. This was responsible for the second call to beforeFilter();
Also, the cake book for 2.3 is a little misguiding in the way it defines
the new parameters for cached elements.
On page 50
This happens in CakePHP 2.3.
If you define a beforeFilter() method in any of your controllers and call
public function beforeFilter(){
parent::beforeFilter();
//Other controller code here
}
CakePHP calls your controller beforeFilter() which already contains a call
to parent
CakePHP calls your controller beforeFilter() which already contains a call
to parent::beforeFilter() and then calls the AppController's beforeFilter()
again.
That's not how CakePHP works.
AD
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com
executes and
checks permissions.
Your're spreading your auth logic around =)
And anyway putting the class in the uses array doesn't work because
controller classes are loaded after the beforeFilter() from what I read in
the dispatcher code.
That's logically impossible since the beforeFilter
-libraries/components/authentication.html#authorization
Yes I know...actually what really happens is that inside beforeFilter()
$this-Auth-isAuthorized() is called, since cake doesn't have any
support for using authorization for anonymous users I call it
explicitly. So no spreading of authorization
beforeFilter()
$this-Auth-isAuthorized() is called, since cake doesn't have any
support for using authorization for anonymous users I call it
explicitly. So no spreading of authorization code, it's still inside the
authorize component. yes, I know it's a strange usage of cakephp
On Sun, Jan 13, 2013 at 3:05 PM, Stefano Campanella
leona...@guildofmessengers.com wrote:
Nevermind, there was a mistake in a part of the Group class I'd have never
thought of XD
I'm having some trouble trying to follow what it is you're trying to
do, but it appears that the crux of it is that
Hi all,
I am trying to find a way to successfully load a model in before Filter
without causing the explosion of my controller :D
I am working on CakePHP 2.3.0 RC2
Basically, I am calling ClassRegistry::init() to load a model in
AppController's beforeFilter() and it works perfectly. The only
a model in
AppController's beforeFilter() and it works perfectly. The only problem is
that after this my controller fails to load its own model, it loads a
generic AppModel instead.
In particular, I have my UsersController which executes the beforeFilter()
of AppController, in which
the beforeFilter() from what I read in
the dispatcher code. It seems so strange that models are not loaded in a
callback that is used so often.
One thing I noticed is that if I rename the model filename from User.php to
user.php them the model is loaded correctly...but this goes against
Thanks for your answers. That's also how I understand this remark in the
cookbook.
But it could probably be clarified, because apparently the given sample
code may be a bit confusing for people not very confident with oop. It
seems that it leads some people to include a beforeFilter() method
While answering a recent question on stackoverflow (http://
stackoverflow.com/questions/13825073/always-call-a-function-in-
cakephp), I discovered that it seems to be recommended in the cookbook
to always override the AppController beforeFilter() in child
controllers (http://book.cakephp.org/2.0
a recent question on stackoverflow (http://
stackoverflow.com/questions/13825073/always-call-a-function-in-
cakephp), I discovered that it seems to be recommended in the cookbook
to always override the AppController beforeFilter() in child
controllers (http://book.cakephp.org/2.0/en
:
While answering a recent question on stackoverflow (http://
stackoverflow.com/questions/13825073/always-call-a-function-in-
cakephp), I discovered that it seems to be recommended in the cookbook
to always override the AppController beforeFilter() in child
controllers (http://book.cakephp.org
I have an issue with using redirect in beforeFilter.
First, it seems that I can't use redirect in appcontroller(beforeFilter). Is
there a way around?
I've tried with Auth component allowing all actions and it worked.
But I don't think this is a proper way to do it.
Second, I can't redirect user
It's difficult to say without seeing your code. Define can't use.
On Tue, Nov 6, 2012 at 5:57 PM, sbang4 sba...@gmail.com wrote:
I have an issue with using redirect in beforeFilter.
First, it seems that I can't use redirect in appcontroller(beforeFilter). Is
there a way around?
I've tried
Hi,
In my AppControllers beforeFilter I use a TreeHelper to generate the main
menu.
Now I need to pass a/some arguments to this TreeHelper from within a Views
element.
Does anyone know if it can be done and how to do this? Or do I need to put
this TreeHelper somewhere else instead
,... can't read user,... and function
beforeFilter() is in a app-controller.php with settings
var $helpers = array('Html', 'Form', 'Time', 'Text', 'Javascript',
'Ajax', 'Session', 'Application', 'User', 'PhotoShow');
var $components = array('Cookie', 'RequestHandler', 'Session
() function?
Am Mittwoch, 26. September 2012 14:26:23 UTC+2 schrieb Chris:
hi Jeremy,... can't access the site (secure area) with username and
password,... loosing session I think,... can't read user,... and function
beforeFilter() is in a app-controller.php with settings
var $helpers
function beforeFilter working on a 1.2,... trying to migrate whole script
to 1.3,...
having problem,... what can be wrong,... ??? please help,... thanks
function beforeFilter()
{
if($this-Session-check('user'))
$this-user = $this-Session-read('user
Why not describe your problem?
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 26 Sep 2012, at 13:10:17, Chris chris...@yahoo.com wrote:
function beforeFilter working on a 1.2,... trying to migrate whole script to
1.3,...
having problem,... what can be wrong,... ??? please help
not describe your problem?
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 26 Sep 2012, at 13:10:17, Chris chris...@yahoo.com wrote:
function beforeFilter working on a 1.2,... trying to migrate whole script
to 1.3,...
having problem,... what can be wrong,... ??? please help,... thanks
hi Jeremy,... can't access the site (secure area) with username and
password,... loosing session I think,... can't read user,... and function
beforeFilter() is in a app-controller.php with settings
var $helpers = array('Html', 'Form', 'Time', 'Text', 'Javascript',
'Ajax', 'Session
maybe its the ancient loadModel() function?
Am Mittwoch, 26. September 2012 14:26:23 UTC+2 schrieb Chris:
hi Jeremy,... can't access the site (secure area) with username and
password,... loosing session I think,... can't read user,... and function
beforeFilter() is in a app
://www.classoutfit.com
On 26 Sep 2012, at 13:10:17, Chris chri...@yahoo.com javascript:
wrote:
function beforeFilter working on a 1.2,... trying to migrate whole script
to 1.3,...
having problem,... what can be wrong,... ??? please help,... thanks
function beforeFilter
Chris:
hi Jeremy,... can't access the site (secure area) with username and
password,... loosing session I think,... can't read user,... and function
beforeFilter() is in a app-controller.php with settings
var $helpers = array('Html', 'Form', 'Time', 'Text', 'Javascript',
'Ajax
,... can't read user,... and function
beforeFilter() is in a app-controller.php with settings
var $helpers = array('Html', 'Form', 'Time', 'Text', 'Javascript', 'Ajax',
'Session', 'Application', 'User', 'PhotoShow');
var $components = array('Cookie', 'RequestHandler', 'Session
http:/google.com/search?q=cakephp+flow+chart
Some of diagrams are bit outdated (for 1.x) but basics are still the same.
Configure cache + sessions to not use filesystem storage and disable debug.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the
On Monday, 23 April 2012 03:24:27 UTC+2, Dan Moseley wrote:
Hi All,
Could anyone help me to understand exactly what occurs prior to the first
line of the app_controller's beforeFilter?
I'm using the following line on the first line of my app_controller:
round(microtime(true) - $_SERVER
wrote:
Hi All,
Could anyone help me to understand exactly what occurs prior to the first
line of the app_controller's beforeFilter?
I'm using the following line on the first line of my app_controller:
round(microtime(true) - $_SERVER['REQUEST_TIME'], 2);
This timer averages between 0.2
Hi All,
Could anyone help me to understand exactly what occurs prior to the first
line of the app_controller's beforeFilter?
I'm using the following line on the first line of my app_controller:
round(microtime(true) - $_SERVER['REQUEST_TIME'], 2);
This timer averages between 0.2 and 1.2
Argh, damn xD The good old ClassRegistry, totally forgotten, thanks
for the hint!
-- Christian
On Jan 5, 11:16 pm, majna majna...@gmail.com wrote:
You can load plugins form db in bootstrap.php too:
$pluginHooks = ClasRegistry::init('PluginHook')-find('all');
foreach ( $pluginHooks as
::beforeFilter:
= 8 =
public function beforeFilter() {
parent::beforeFilter();
$this-loadModel( 'PluginHook' );
$pluginHooks = $this-PluginHook-find(
'all'
);
$plugins = array( );
foreach ( $pluginHooks as $pluginHook ) {
$plugins[ $pluginHook[ 'PluginHook' ][ 'hook_id
You can load plugins form db in bootstrap.php too:
$pluginHooks = ClasRegistry::init('PluginHook')-find('all');
foreach ( $pluginHooks as $pluginHook ) ...
and then Configure::write('plugins', $plugins) for your hooks to be
available in views as Configure::read('plugins');
--
Our newest site
but with no
permissions in the aro_aco table no one should have access to any of
the users controller actions.
When I completely remove the beforeFilter function, this holds true.
I can not access the users controllers index function - as expected.
However when I simply put the function back in, I can access index,
edit
call parent::beforeFilter()
also bindNode should be in your model
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from
Start with breaking the chunks out into smaller private functions. See
if that helps.
On Jul 5, 1:59 pm, Zeu5 kimc...@gmail.com wrote:
Hi there,
the beforeFilter function in my app_controller over time has grown
into a monstrous 300 line code.
in that beforeFilter, i do things like
Hi there,
the beforeFilter function in my app_controller over time has grown
into a monstrous 300 line code.
in that beforeFilter, i do things like
$this-set for non admin pages
$this-Cookie-write
$this-Auth-fields = array('username' = 'email', 'password' =
'password');
$this-Auth-authorize
.
What's confusing me is that several fields are already marked invalid
as soon as the page is loaded. No data was submitted, no data
validated, no save action has taken place. Moreover, dumping $this-
User-invalidFields() at the moment the request enters
UsersController::beforeFilter() shows
is being passed to the
server ok but something's keeping the action from running. I've got
log statements in both beforeFilter and the action itself, but the
latter never show up in the log. Can anyone see anything I've missed?
function beforeFilter()
{
parent::beforeFilter
I've written a controller to handle a few XML-RPC requests, as well a
a basic PHP client to test with. The data is being passed to the
server ok but something's keeping the action from running. I've got
log statements in both beforeFilter and the action itself, but the
latter never show up
to be allowing me. I just kept getting 'you are not
authorized...' messages.
In another tutorial I then read through it said that I should have
$this-Auth-userModel = 'User'; in the beforefilter of my users
controller and posts controller. When I put that line in things
started to work. So I'm
Most of those settings are default, so now you do not have to add them
as long as you follow conventions. For easier convenience, place in
your AppController.
However, you do need to allow() in every controllers beforeFilter().
On Feb 9, 12:03 pm, barricades davow...@googlemail.com wrote:
I'm
I have a mystery on my hands and I'm completely stumped. I'm really
hoping someone can point me in the right direction.
In my AppController class, I have a check in beforeFilter that if
fails calls flash() to display a message for 3 seconds and return the
user to another page. It works well
On Mon, Dec 6, 2010 at 1:23 PM, creationsings elfind...@gmail.com wrote:
I have a mystery on my hands and I'm completely stumped. I'm really
hoping someone can point me in the right direction.
In my AppController class, I have a check in beforeFilter that if
fails calls flash() to display
Hi cricket...thanks for replying. I actually checked that first and I
am indeed calling the parent method in all my overrides.
I did actually find a solution, though not the ideal one. So, the
action method that was giving me problems is called submenu ...but I
was actually trying to reuse an
AJAX processing is very strange and called at very strange times.
Try to move your logic from beforeFilter() to beforeRender().
If nothing helps you can hack RequestHandler to not re-set Content-
Type...
On Dec 3, 11:25 am, starchild.no1 starchild@gmail.com wrote:
Hi all,
I'm doing an ajax
Hi all,
I'm doing an ajax update to see if username exsist.. However when I
use the standard RequestHandler markup in my AppController or Users
Controller beforeFilter
function beforeFilter
$this-user['User']['id'] == $this-guestId;
}
}
To automatically have this $user object available in my views, I want
to set it in a beforeFilter().
function _prepareUser() {
$this-user = new UserProxy($this-SimpleAuth, $this-SimpleAcl);
$this-set('user', $this-user);
}
This requires
Oh, and by the way: why is the filter in beforeFilter resp.
afterFilter? beforeRender makes sense to me, but beforeFilter seems a
strange name to me...
On Fri, Nov 12, 2010 at 10:30 AM, Joshua Muheim psybea...@gmail.com wrote:
I'm using a component called SimpleAuth and SimpleAcl (instead
logic.
*
* So the new sequence is:
* - beforeFilter()
* - initialization of components
* - _afterComponentsInitialization()
* - action logic
* - beforeRender()
* - rendering logic
* - afterFilter()
*
* To work properly, AfterComponentsInitializationFilter needs to be the last
* Item
Hi all
Is there a filter that runs after the initialization of components but
before beforeRender?
Thanks for help
Josh
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the
Why do you need one ?
On Thu, Nov 11, 2010 at 7:18 PM, psybear83 psybea...@gmail.com wrote:
Hi all
Is there a filter that runs after the initialization of components but
before beforeRender?
Thanks for help
Josh
Check out the new CakePHP Questions site http://cakeqs.org and help others
Components are initialized before they get to beforeFilter(), so
beforeFilter() should work fine.
https://github.com/cakephp/cakephp/blob/master/cake/libs/controller/controller.php#L525
On Nov 11, 9:24 am, Bogdan Bursuc bogdanbursu...@gmail.com wrote:
Why do you need one ?
On Thu, Nov 11
Also forgot to mention that there is an afterFilter() as well.
On Nov 11, 10:30 am, Miles J mileswjohn...@gmail.com wrote:
Components are initialized before they get to beforeFilter(), so
beforeFilter() should work fine.
https://github.com/cakephp/cakephp/blob/master/cake/libs/controller/c
is administrator or not to proceed further to see the admin
area. (I already know how, but I don't want to repeat this code for
every admin_action. I prefer to place this code in the beforeFilter of
the app_controller)//
Check out the new CakePHP Questions site http://cakeqs.org and help others
matthew, you dont use beforeFilter() to pass variables to the view
especially due to the problem that it is not invoked on errors
use beforeRender() for it! this will always be called - not matter
what
On 16 Mrz., 06:44, Dr. Loboto drlob...@gmail.com wrote:
I know the only way - create
use beforeFilter() to pass variables to the view
especially due to the problem that it is not invoked on errors
use beforeRender() for it! this will always be called - not matter
what
On 16 Mrz., 06:44, Dr. Loboto drlob...@gmail.com wrote:
I know the only way - create AppError, define
I'm passing variables into my main layout in the beforeFilter() method
using $this-set in my main app_controller,
However, if someone visits a broken URL (where you would get a
missing controller|action|view message, the beforeFilter doesn't run
so bits of the layout are functioning correctly
Dunham m...@umpcmedia.com wrote:
I'm passing variables into my main layout in the beforeFilter() method
using $this-set in my main app_controller,
However, if someone visits a broken URL (where you would get a
missing controller|action|view message, the beforeFilter doesn't run
so bits
hi,
I am beginner in cakephp.
I made controller and i want to apply Beforefilter() ,
which checks every time when controller/action calls.
i write beforefilter() in my controller and checking if session is exist and
username is set or not.
function beforefilter()
{
$username
You have to make sure that the beforeFilter method allows the user to
access /admin/index!
So add a check that if it is admin/index, then do not redirect :)
Enjoy,
John
On Jan 16, 2:45 pm, Uresh uresh.pa...@ifuturz.com wrote:
hi,
I am beginner in cakephp.
I made controller and i want
I found an alternative solution by using beforeRender instead of
beforeFilter
And assigning `logged_in` in 'ObAuth' Comp.
On Dec 20, 11:45 am, NeoWebTech deva.in...@gmail.com wrote:
Hello!
I am PHP Developer for some time and developing my second CakePHP App
now :)
I am getting
he is right
at the beginning the had the same problems
the reason:
if an error is triggered, beforeFilter() and afterFilter() are not
invoked!
so everything you need in the layout should be in beforeRender()
this should be the case anyway
imagine you process some post data and redirect
action defined in
controller which actually is 404 in production but I still want to
access the variable. How can I do this?
This the code in default.cpt
?php e($logged_in); ?
I set $logged_in AppController's beforeFilter function. Following the
whole code:
class AppController extends Controller
');
function beforeFilter()
{
pr($this);
}
}
?
but I have not response from it
Why that ? ? ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email
Ok ! ! !
What I do is to call from the controller beforeFilter action the
AppController::beforeFilter();
But I don't know if that is ok or If I have to do something
else ! ! ! ? ? ?
Thanks a lot :)
On 30 Ιούλ, 11:05, DatacenterHellas merianosni...@gmail.com wrote:
Hello all :)
I'm creating
hi,
have you declared an beforeFilter() function in your active controller?
try to call parent::beforeFilter(); in that function.
i hope the pr($this); call is for test purposes only ;) because you dont
print anything in your controllers/models
greets
Andreas
DatacenterHellas schrieb:
Ok
What I done is
AppController::beforeFilter();
Is that incorect ? ? ?
What is the deference of the parent::beforeFilter();
The pr($this) is only for test :)
Kind regards
Merianos Nikos
--~--~-~--~~~---~--~~
You received this message because you are subscribed
You call it as parent::beforeFilter(), not
AppController::beforeFilter(). parent is a keyword that refers to the
class that some other class extends.
And use parent::beforeFilter() only if the your controller also has a
beforeFilter() method. If it does not, AppController's beforeFilter
I figured Cake would give me errors if I did that, so I never tried
it :( It works fine now though, thanks a lot!
Justin
On Jun 27, 5:15 pm, Jorge Horacio Cué Cantú jorge@gmail.com
wrote:
You can set the salt to an empty strung, too.
Regards
2009/6/27 Justin Poliey jd...@njit.edu
Right now I'm using Cake's Auth component to build a simple user
system. Pastes of the files in their entirety are available
http://gist.github.com/136935 for reference.
The problem is that when I call: $this-Auth-authenticate =
ClassRegistry::init('User'), login.ctp always shows Login failed.
Right now I'm using Cake's Auth component to build a simple user
system. Pastes of the files in their entirety are available
http://gist.github.com/136935 for reference.
The problem is that when I call: $this-Auth-authenticate =
ClassRegistry::init('User'), login.ctp always shows Login failed.
I understand that you are using MD5 instead of SHA1 in your user
model!
If that is the final decision, then why don't you just tell CakePHP to
use MD5 as default and as shown in the example at:
http://book.cakephp.org/view/566/Change-Hash-Function
Maybe that would help you!
Enjoy,
John
On
That's where I got the information I'm using now. The problem is if I
just change the hash function with Security::setHash, Cake will still
apply the salt before it hashes the passwords, so the hashes will
still be incompatible.
Thanks
Justin
On Jun 27, 7:06 am, John Andersen
You can set the salt to an empty strung, too.
Regards
2009/6/27 Justin Poliey jd...@njit.edu
That's where I got the information I'm using now. The problem is if I
just change the hash function with Security::setHash, Cake will still
apply the salt before it hashes the passwords, so the
I am setting a variable value that in app_controller beforeFilter, and
I would like to access it in all child controllers beforeFilter
function.
class AppController extends Controller {
var $components = array('Auth');
var $uses = array('User');
$auth_id = $this-Auth-user('id
setting a variable value that in app_controller beforeFilter, and
I would like to access it in all child controllers beforeFilter
function.
class AppController extends Controller {
var $components = array('Auth');
var $uses = array('User');
$auth_id = $this-Auth-user('id
On Apr 10, 11:16 am, qwanta rgmic...@gmail.com wrote:
I am setting a variable value that in app_controller beforeFilter, and
I would like to access it in all child controllers beforeFilter
function.
class AppController extends Controller {
var $components = array('Auth');
var $uses
As a personal preference, I would store it in the session. This way it
can be accessed outside of the controller as well.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send
beforeFilter() method and
if the check fails I want to stop execution of the action and render a
view.
I have something like this
function beforeFilter()
{
.
if (!$check)
{
$data = array('msg'='my message');
$this-set('data', $data);
$this-layout = 'json
you need to return false.
On Tue, Jan 20, 2009 at 11:53 AM, Ron ron8...@gmail.com wrote:
I am creating a check in my app_controller beforeFilter() method and
if the check fails I want to stop execution of the action and render a
view.
I have something like this
function
1 - 100 of 255 matches
Mail list logo