fix bug of login/authinfo not refreshed when reseting authkey

pull/61/head
Christophe Vandeplas 2012-03-20 15:44:39 +01:00
parent c5954b081b
commit 7a3be6953c
2 changed files with 4 additions and 1 deletions

View File

@ -345,7 +345,9 @@ class EventsController extends AppController {
// User has filled in his contact form, send out the email.
if ($this->request->is('post') || $this->request->is('put')) {
$message = $this->request->data['Event']['message'];
if ($this->_sendContactEmail($id, $message)) {
if ($this->_sendContactEmail($id, $message)) {
// LATER when a user is deleted this will create problems.
// LATER send the email to all the people who are in the org that created the event
// redirect to the view event page
$this->Session->setFlash(__('Email sent to the reporter.', true));
} else {

View File

@ -262,6 +262,7 @@ class UsersController extends AppController {
$newkey = $this->User->generateAuthKey();
$this->User->saveField('authkey', $newkey);
$this->Session->setFlash(__('New authkey generated.', true));
$this->_refreshAuth();
$this->redirect($this->referer());
}