import v1.1.0_RC2 | 2009-09-20

This commit is contained in:
2019-07-17 22:19:00 +02:00
parent 3b7ba80568
commit 38c146901c
2504 changed files with 101817 additions and 62316 deletions

View File

@ -80,6 +80,7 @@ class Users_LoginController extends CommunityID_Controller_Action
public function logoutAction()
{
Zend_Auth::getInstance()->clearIdentity();
Zend_Session::forgetMe();
$this->_redirect('');
}

View File

@ -42,6 +42,8 @@ class Users_ManageusersController extends CommunityID_Controller_Action
$mail = self::getMail($user, $this->view->translate('Community-ID registration reminder'));
try {
$mail->send();
$user->reminders++;
$user->save();
} catch (Zend_Mail_Protocol_Exception $e) {
Zend_Registry::get('logger')->log($e->getMessage(), Zend_Log::ERR);
}
@ -52,7 +54,7 @@ class Users_ManageusersController extends CommunityID_Controller_Action
* @return Zend_Mail
* @throws Zend_Mail_Protocol_Exception
*/
public static function getMail(User $user, $subject)
public static function getMail(Users_Model_User $user, $subject)
{
$locale = Zend_Registry::get('Zend_Locale');
$localeElements = explode('_', $locale);

View File

@ -11,6 +11,13 @@
class Users_PersonalinfoController extends CommunityID_Controller_Action
{
public function preDispatch()
{
if ($this->user->role == Users_Model_User::ROLE_ADMIN) {
throw new Monkeys_AccessDeniedException();
}
}
public function indexAction()
{
$this->_helper->actionStack('index', 'login', 'users');

View File

@ -182,6 +182,10 @@ class Users_ProfilegeneralController extends CommunityID_Controller_Action
public function confirmdeleteAction()
{
if ($this->user->role == Users_Model_User::ROLE_ADMIN) {
throw new Monkeys_AccessDeniedException();
}
$this->_helper->actionStack('index', 'login', 'users');
}

View File

@ -120,6 +120,7 @@ class Users_RegisterController extends CommunityID_Controller_Action
|| !($user = $users->getUserWithToken($this->_request->getParam('token')))) {
$this->_helper->FlashMessenger->addMessage($this->view->translate('Invalid token'));
$this->_redirect('');
return;
}
$this->view->token = $user->token;
@ -148,6 +149,7 @@ class Users_RegisterController extends CommunityID_Controller_Action
Zend_Registry::get('logger')->log('invalid token', Zend_Log::DEBUG);
$this->_helper->FlashMessenger->addMessage($this->view->translate('Invalid token'));
$this->_redirect('');
return;
}
$user->delete();
@ -162,6 +164,7 @@ class Users_RegisterController extends CommunityID_Controller_Action
|| !($user = $users->getUserWithToken($this->_request->getParam('token')))) {
$this->_helper->FlashMessenger->addMessage($this->view->translate('Invalid token'));
$this->_redirect('');
return;
}
$user->role = Users_Model_User::ROLE_REGISTERED;

View File

@ -1,4 +1,4 @@
<?
<?php
/*
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
@ -61,6 +61,7 @@ class Users_UserslistController extends CommunityID_Controller_Action
$jsonObjUser->registration = $user->registration_date;
$jsonObjUser->role = $user->role;
$jsonObjUser->status = $status;
$jsonObjUser->reminders = $user->reminders;
$jsonObj->records[] = $jsonObjUser;
}