Re: CakeDC users plugin

2011-03-24 Thread Zaky Katalan-Ezra
Did you put this in app_controller?

public function beforeFilter() {
$this-Auth-authorize = 'controller';
$this-Auth-fields = array('username' = 'email', 'password' =
'passwd');
$this-Auth-loginAction = array('plugin' = 'users', 'controller'
= 'users', 'action' = 'login', 'admin' = false);
$this-Auth-loginRedirect = '/';
$this-Auth-logoutRedirect = '/';
$this-Auth-authError = __('Sorry, but you need to login to access
this location.', true);
$this-Auth-loginError = __('Invalid e-mail / password
combination.  Please try again', true);
$this-Auth-autoRedirect = true;
$this-Auth-userModel = 'User';
$this-Auth-userScope = array(
'User.active' = 1);

if ($this-Auth-user()) {
$this-set('userData', $this-Auth-user());
$this-set('isAuthorized', ($this-Auth-user('id') != ''));
}

}

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-24 Thread Ryan Schmidt

On Mar 24, 2011, at 02:17, Zaky Katalan-Ezra wrote:

 Did you put this in app_controller?

Nope, but I'll try it, thanks. Where in the users plugin documentation does it 
say to do this?

 public function beforeFilter() { 
 $this-Auth-authorize = 'controller'; 
 $this-Auth-fields = array('username' = 'email', 'password' = 
 'passwd'); 
 $this-Auth-loginAction = array('plugin' = 'users', 'controller' = 
 'users', 'action' = 'login', 'admin' = false); 
 $this-Auth-loginRedirect = '/'; 
 $this-Auth-logoutRedirect = '/'; 
 $this-Auth-authError = __('Sorry, but you need to login to access 
 this location.', true); 
 $this-Auth-loginError = __('Invalid e-mail / password combination.  
 Please try again', true); 
 $this-Auth-autoRedirect = true; 
 $this-Auth-userModel = 'User'; 
 $this-Auth-userScope = array( 
 'User.active' = 1); 
  
 if ($this-Auth-user()) { 
 $this-set('userData', $this-Auth-user()); 
 $this-set('isAuthorized', ($this-Auth-user('id') != '')); 
 } 
  
 }
 
 

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-24 Thread Zaky Katalan-Ezra
I doesn't.
I downloaded  
Sample-Comments-Applicationhttps://github.com/CakeDC/Sample-Comments-Applicationand
used it as a reference

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-23 Thread Sam Sherlock
http://localhost/sample/admin/users/users/
is the one

this works fine for me as far as I recall



On 23 March 2011 04:28, Zaky Katalan-Ezra procsh...@gmail.com wrote:

 Also in the users index view the edit and view buttons next to each users
 pass the user id when view is looking for slug parameter and edit need no
 parameter at all.
 Looks like a sloppy work.
 But still great plug-in with a bit of work it should be great.

 I set my user is_admin=1 but after login I didn't redirected to admin
 prefix.
 I also didn't success in typing the admin prefix in the url.

 My non admin url for index  view is http://localhost/sample/users/users/
 where do I add the admin prefix?
 I tried http://localhost/sample/admin/users/users/ and
 http://localhost/sample/users/admin/users/
 without success.

 On Wed, Mar 23, 2011 at 12:42 AM, Sam Sherlock sam.sherl...@gmail.comwrote:

 nope only migrations and schema

 https://github.com/CakeDC/users/tree/master/config/

 and to me it would make more sense if register mapped to add


 On 22 March 2011 22:35, gremlin abba.bry...@gmail.com wrote:

 Just a guess - is there a routes file in the plugin that you didn't
 copy over to your config/routes.php? A route mapped from /users/add
 to /users/register would make sense for this sort of error.


 On Mar 22, 10:15 am, Ryan Schmidt google-2...@ryandesign.com wrote:
  Perhaps I should be asking: is there a tutorial somewhere that will
 show me how to use the users plugin -- starting from creating a new empty
 CakePHP app ending with a working example? The readme says it's simple to
 use, but I am not finding it so, and I don't seem to be the only one having
 trouble:
 
  http://www.webmastertalkforums.com/cakephp/18874-there-demo-app-anywh.
 ..

 --
 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 this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


  --
 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 this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




 --
 Regards,
 Zaky Katalan-Ezra
 QA Administrator
 www.IGeneriX.com
 Sites.IGeneriX.com
 054-7762312


-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-23 Thread Zaky Katalan-Ezra
I get this message:
Missing Controller

*Error: * *AdminController* could not be found.

*Error: * Create the class *AdminController* below in file:
app/controllers/admin_controller.php

?php
class AdminController extends AppController {

var $name = 'Admin';
}
?

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-23 Thread Sam Sherlock
have you got
line 88 (ish) -  Configure::write('Routing.prefixes', array('admin'));
of app/config/core.php

http://book.cakephp.org/view/950/Prefix-Routing
 - S



On 23 March 2011 17:33, Zaky Katalan-Ezra procsh...@gmail.com wrote:

 I get this message:
 Missing Controller

 *Error: * *AdminController* could not be found.

 *Error: * Create the class *AdminController* below in file:
 app/controllers/admin_controller.php

 ?php
 class AdminController extends AppController {

   var $name = 'Admin';
 }
 ?




-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-23 Thread Zaky Katalan-Ezra
In a dozen other projects yes but not in this one.

Thank you

On Wed, Mar 23, 2011 at 7:44 PM, Sam Sherlock sam.sherl...@gmail.comwrote:

 have you got
 line 88 (ish) -  Configure::write('Routing.prefixes', array('admin'));
 of app/config/core.php

 http://book.cakephp.org/view/950/Prefix-Routing
  - S




 On 23 March 2011 17:33, Zaky Katalan-Ezra procsh...@gmail.com wrote:

 I get this message:
 Missing Controller

 *Error: * *AdminController* could not be found.

 *Error: * Create the class *AdminController* below in file:
 app/controllers/admin_controller.php

 ?php
 class AdminController extends AppController {

  var $name = 'Admin';
 }
 ?






-- 
Regards,
Zaky Katalan-Ezra
QA Administrator
www.IGeneriX.com
Sites.IGeneriX.com
054-7762312

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-23 Thread Ryan Schmidt

On Mar 23, 2011, at 10:16, Sam Sherlock wrote:

 http://localhost/sample/admin/users/users/
 is the one
 
 this works fine for me as far as I recall

When I access

http://localhost/admin/users/users

It redirects to

http://localhost/admin/users/login

and says

Error: LoginController could not be found.

I don't have a login controller; the users plugin readme doesn't say I need to 
make one.



-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-23 Thread Sam Sherlock
I think connecting the admin login to the non admin login will work

Router::connect('/admin/users/login', array('plugin' = 'users', 'prefix' =
null, controller' = 'users', 'action' = 'login'));



On 23 March 2011 18:39, Ryan Schmidt google-2...@ryandesign.com wrote:


 On Mar 23, 2011, at 10:16, Sam Sherlock wrote:

  http://localhost/sample/admin/users/users/
  is the one
 
  this works fine for me as far as I recall

 When I access

 http://localhost/admin/users/users

 It redirects to

 http://localhost/admin/users/login

 and says

 Error: LoginController could not be found.

 I don't have a login controller; the users plugin readme doesn't say I need
 to make one.



 --
 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 this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-22 Thread Sam Sherlock
the CakeDC plugin uses register

you could make the route users/add connect to the register action of the
plugin

 - S



On 22 March 2011 16:42, Ryan Schmidt google-2...@ryandesign.com wrote:

 I'm trying to add the CakeDC users plugin to my site. I've been postponing
 adding user login functionality, knowing I'd want to use this plugin.

 I've put the latest versions of the users, search and utils plugins into
 the plugins folder. I moved aside my existing users table, user model, users
 view, and users controller, which didn't have much in them. I let the plugin
 create its own users and details tables, using the schema shell.

 Accessing www.example.com/users shows me the plugin's list of users page,
 empty. There's a New User button which, when clicked, loads
 www.example.com/users/users/add, which says:

 Error: The action add is not defined in controller UsersController

 Error: Create UsersController::add() in file:
 app/controllers/users_controller.php.

 I'm not understanding why this isn't just working.



 --
 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 this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-22 Thread Ryan Schmidt
On Mar 22, 2011, at 11:54, Sam Sherlock wrote:
 On 22 March 2011 16:42, Ryan Schmidt wrote:
 Accessing www.example.com/users shows me the plugin's list of users page, 
 empty. There's a New User button which, when clicked, loads 
 www.example.com/users/users/add, which says:
 
 Error: The action add is not defined in controller UsersController
 
 Error: Create UsersController::add() in file: 
 app/controllers/users_controller.php.
 
 
 the CakeDC plugin uses register

If there's not supposed to be an add action, then why does 
plugins/users/views/details/add.ctp echo $this-Html-link(__d('users', 'New 
User', true), array('controller'= 'users', 'action'='add')) ?



-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-22 Thread Ryan Schmidt
Perhaps I should be asking: is there a tutorial somewhere that will show me how 
to use the users plugin -- starting from creating a new empty CakePHP app 
ending with a working example? The readme says it's simple to use, but I am not 
finding it so, and I don't seem to be the only one having trouble:

http://www.webmastertalkforums.com/cakephp/18874-there-demo-app-anywhere-uses-cakedc-users-plugin.html


-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-22 Thread Sam Sherlock
A few other things strike me as odd with the users plugin (I can't recall
what they are just now; not currently at my machine)

If there's not supposed to be an add action, then why does
 plugins/users/views/details/
 add.ctp echo $this-Html-link(__d('users', 'New User', true),
 array('controller'= 'users', 'action'='add')) ?


thats a good question - might just be that it should be renamed.

http://www.webmastertalkforums.com/cakephp/18874-there-demo-app-anywhere-uses-cakedc-users-plugin.html


not that I have seen - why the poster asked there rather than here is beyond
me though.
I thought that perhaps the issues were particular to me - but maybe not

a sample application for users plugin would be ace

I guess the thing that makes it no simple is the advanced things you can do
with it;
It did take some effort getting setup (I am extending the plugins mvc within
my app)



On 22 March 2011 17:15, Ryan Schmidt google-2...@ryandesign.com wrote:

 Perhaps I should be asking: is there a tutorial somewhere that will show me
 how to use the users plugin -- starting from creating a new empty CakePHP
 app ending with a working example? The readme says it's simple to use, but I
 am not finding it so, and I don't seem to be the only one having trouble:


 http://www.webmastertalkforums.com/cakephp/18874-there-demo-app-anywhere-uses-cakedc-users-plugin.html


 --
 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 this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-22 Thread gremlin
Just a guess - is there a routes file in the plugin that you didn't
copy over to your config/routes.php? A route mapped from /users/add
to /users/register would make sense for this sort of error.


On Mar 22, 10:15 am, Ryan Schmidt google-2...@ryandesign.com wrote:
 Perhaps I should be asking: is there a tutorial somewhere that will show me 
 how to use the users plugin -- starting from creating a new empty CakePHP app 
 ending with a working example? The readme says it's simple to use, but I am 
 not finding it so, and I don't seem to be the only one having trouble:

 http://www.webmastertalkforums.com/cakephp/18874-there-demo-app-anywh...

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-22 Thread Sam Sherlock
nope only migrations and schema

https://github.com/CakeDC/users/tree/master/config/

and to me it would make more sense if register mapped to add

On 22 March 2011 22:35, gremlin abba.bry...@gmail.com wrote:

 Just a guess - is there a routes file in the plugin that you didn't
 copy over to your config/routes.php? A route mapped from /users/add
 to /users/register would make sense for this sort of error.


 On Mar 22, 10:15 am, Ryan Schmidt google-2...@ryandesign.com wrote:
  Perhaps I should be asking: is there a tutorial somewhere that will show
 me how to use the users plugin -- starting from creating a new empty CakePHP
 app ending with a working example? The readme says it's simple to use, but I
 am not finding it so, and I don't seem to be the only one having trouble:
 
  http://www.webmastertalkforums.com/cakephp/18874-there-demo-app-anywh...

 --
 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 this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC users plugin

2011-03-22 Thread Zaky Katalan-Ezra
Also in the users index view the edit and view buttons next to each users
pass the user id when view is looking for slug parameter and edit need no
parameter at all.
Looks like a sloppy work.
But still great plug-in with a bit of work it should be great.

I set my user is_admin=1 but after login I didn't redirected to admin
prefix.
I also didn't success in typing the admin prefix in the url.

My non admin url for index  view is http://localhost/sample/users/users/
where do I add the admin prefix?
I tried http://localhost/sample/admin/users/users/ and
http://localhost/sample/users/admin/users/
without success.

On Wed, Mar 23, 2011 at 12:42 AM, Sam Sherlock sam.sherl...@gmail.comwrote:

 nope only migrations and schema

 https://github.com/CakeDC/users/tree/master/config/

 and to me it would make more sense if register mapped to add


 On 22 March 2011 22:35, gremlin abba.bry...@gmail.com wrote:

 Just a guess - is there a routes file in the plugin that you didn't
 copy over to your config/routes.php? A route mapped from /users/add
 to /users/register would make sense for this sort of error.


 On Mar 22, 10:15 am, Ryan Schmidt google-2...@ryandesign.com wrote:
  Perhaps I should be asking: is there a tutorial somewhere that will show
 me how to use the users plugin -- starting from creating a new empty CakePHP
 app ending with a working example? The readme says it's simple to use, but I
 am not finding it so, and I don't seem to be the only one having trouble:
 
  http://www.webmastertalkforums.com/cakephp/18874-there-demo-app-anywh.
 ..

 --
 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 this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


  --
 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 this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




-- 
Regards,
Zaky Katalan-Ezra
QA Administrator
www.IGeneriX.com
Sites.IGeneriX.com
054-7762312

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC Users Plugin - redirect based on role?

2011-03-04 Thread Sam Bernard
One simple way is just to have a generic dashboard action that chooses 
what to display based on user role. You'll want to make sure to manually 
call $this-render() in your _dashboard actions.

function dashboard(){
$this-autoRender = false;

if($this-Auth-user('role') == 'admin')
$this-_adminDashboard();
} else {
$this-_userDashboard();
}

}

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC Users Plugin - redirect based on role?

2011-03-04 Thread designv...@gmail.com
I LIKEY!

Cheers, that will do it just fine!

d//t

On Mar 4, 9:19 pm, Sam Bernard sambern...@gmail.com wrote:
 One simple way is just to have a generic dashboard action that chooses
 what to display based on user role. You'll want to make sure to manually
 call $this-render() in your _dashboard actions.

 function dashboard(){
 $this-autoRender = false;

 if($this-Auth-user('role') == 'admin')
 $this-_adminDashboard();} else {

 $this-_userDashboard();

 }
 }

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC Users Plugin - redirect based on role?

2011-03-04 Thread designv...@gmail.com
Scratch that.

While that seemed like a solution it doesn't make use of the admin
route...

Anyone else got any ideas?

d//t

On Mar 4, 9:55 pm, designv...@gmail.com designv...@gmail.com
wrote:
 I LIKEY!

 Cheers, that will do it just fine!

 d//t

 On Mar 4, 9:19 pm, Sam Bernard sambern...@gmail.com wrote:

  One simple way is just to have a generic dashboard action that chooses
  what to display based on user role. You'll want to make sure to manually
  call $this-render() in your _dashboard actions.

  function dashboard(){
  $this-autoRender = false;

  if($this-Auth-user('role') == 'admin')
  $this-_adminDashboard();} else {

  $this-_userDashboard();

  }
  }

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC Users Plugin - redirect based on role?

2011-03-04 Thread Sam Bernard
In the beforeFilter of your AppController you could set 
$this-Auth-autoRedirect = false

And then just manually fill in your login action

function login(){
if(!empty($this-data['User'])  $this-Auth-login($this-data))
if($this-Session-read('Auth.redirect')){ //if you got redirected to login 
by trying to access a protected function- it will redirect there instead of 
dashboard 
$this-redirect($this-Session-read('Auth.redirect'));
} else {
//check your group here and redirect based on that
}
}

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakeDC Users plugin - routes issue

2011-02-17 Thread cricket
On Thu, Feb 17, 2011 at 7:02 AM, designv...@gmail.com
designv...@gmail.com wrote:
 Hi there there,

 I have integrated the CakeDC Users plugin fine and it all works out of
 the box, however I want to uses some neater routes for the
 login,register,dashboard actions but adding the following route:

 Router::connect('/login', array('plugin' = 'users','controller' =
 'users', 'action' = 'login'));

 Causes the login to break and I just get a white screen?

A blank screen generally means a fatal error somewhere. Have you
looked at the server's log? Also, try setting debug to 2.

-- 
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 this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php