*If i'm right u can use echo __('some text') in your email views.*
*
*
*
*
*AND a little tip*
if ( !empty($this->request->data['Account']['ruhuman']) ) {
/// We do not accept registrations from bots.
$this->Session->setFlash(__d('z',
'bots_are_not_welcome'));
$this->redirect(array('plugin' => null,
'controller' => 'pages', 'action' => 'index'));
return; // just in case
}
I found it 4 times in AccountsController in 4 different actions.
My tip for you: Do not repeat yourself! Write a private function
__blockRobots(){
if ( !empty($this->request->data['Account']['ruhuman']) ) {
/// We do not accept registrations from bots.
$this->Session->setFlash(__d('z',
'bots_are_not_welcome'));
$this->redirect(array('plugin' => null,
'controller' => 'pages', 'action' => 'index'));
return; // just in case
}
}
end call it when you need it in other actions like:
public function register(){
if($this->request->is('post'){
$this->__blockRobots();
// rest of your code
}
}
W dniu sobota, 21 lipca 2012 08:23:52 UTC+2 użytkownik Albert 'Tigr'
napisał:
>
> Slowly working up the list of TODO items, now the email uses views and the
> internationalization is set up.
>
> I could not find any information though on how e-mail views could be
> arranged to load automatically depending on the language. It looks like the
> only way is to do it by manually selecting the view template when creating
> the mail. Is this correct?
>
> On Wednesday, July 11, 2012 10:06:40 PM UTC+2, Albert 'Tigr' wrote:
>>
>> Hello, all!
>>
>> I wrote a yet another user authentication plugin for the CakePHP. I could
>> not find a plugin that would satisfy my requirements for such operations.
>> It is far from finished, there is a long TODO list but it is fully
>> operational with support for user registration, administration, login etc.
>> So it is perfectly usable already.
>>
>> I will appreciate any feedback on both the general CakePHP using code and
>> the security of the thing.
>>
>> github: https://github.com/tigrino/Z
>>
>> Thanks!
>> Albert aka Tigr
>>
>>
--
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
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php