diff --git a/config/migrations/001_initialize_users_schema.php b/config/migrations/001_initialize_users_schema.php old mode 100644 new mode 100755 index 9383dcea0..a7e5356e3 --- a/config/migrations/001_initialize_users_schema.php +++ b/config/migrations/001_initialize_users_schema.php @@ -66,8 +66,9 @@ class M49c3417a54874a9d276811502cedc421 extends CakeMigration { 'modified' => array('type'=>'datetime', 'null' => true, 'default' => NULL), 'indexes' => array( 'PRIMARY' => array('column' => 'id', 'unique' => 1), - 'BY_USERNAME' => array('column' => array('username', 'passwd'), 'unique' => 0), - 'BY_EMAIL' => array('column' => array('email', 'passwd'), 'unique' => 0)), + 'BY_USERNAME' => array('column' => array('username'), 'unique' => 0), + 'BY_EMAIL' => array('column' => array('email'), 'unique' => 0) + ), ), ), ), diff --git a/config/migrations/map.php b/config/migrations/map.php old mode 100644 new mode 100755 diff --git a/config/schema/users.php b/config/schema/users.php old mode 100644 new mode 100755 index f5096f6fa..343ba9346 --- a/config/schema/users.php +++ b/config/schema/users.php @@ -55,6 +55,6 @@ function after($event = array()) { 'role' => array('type' => 'string', 'null' => true, 'default' => NULL), 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'BY_USERNAME' => array('column' => array('username', 'passwd'), 'unique' => 0), 'BY_EMAIL' => array('column' => array('email', 'passwd'), 'unique' => 0)) + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'BY_USERNAME' => array('column' => array('username'), 'unique' => 0), 'BY_EMAIL' => array('column' => array('email'), 'unique' => 0)) ); } diff --git a/config/smtp.php b/config/smtp.php new file mode 100755 index 000000000..fd7f3820f --- /dev/null +++ b/config/smtp.php @@ -0,0 +1,10 @@ +"; +$config['Email']['port'] = '587'; +$config['Email']['timeout'] = '30'; +$config['Email']['host'] = 'mail.host.pl'; +$config['Email']['username'] = 'name'; +$config['Email']['password'] = 'pass'; +?> \ No newline at end of file diff --git a/controllers/components/users_auth.php b/controllers/components/users_auth.php new file mode 100755 index 000000000..75d4ff049 --- /dev/null +++ b/controllers/components/users_auth.php @@ -0,0 +1,206 @@ +Auth = $this; + + $loginRedirect = $this->Session->read('Auth.redirect'); + if (empty($loginRedirect)) { + $loginRedirect = array( + 'admin' => false, + 'prefix' => 'admin', + 'plugin' => 'users', + 'controller' => 'users', + 'action' => 'dashboard'); + } + + $defaults = array( + 'loginAction' => array( + 'admin' => false, + 'prefix' => 'admin', + 'plugin' => 'users', + 'controller' => 'users', + 'action' => 'login'), + 'authorize' => 'controller', + 'fields' => array( + 'username' => 'email', + 'password' => 'passwd'), + 'loginRedirect' => $loginRedirect, + 'logoutRedirect' => '/', + 'authError' => __d('users', 'Sorry, but you need to login to access this location.', true), + 'loginError' => __d('users', 'Invalid e-mail / password combination. Please try again', true), + 'autoRedirect' => true, + 'userModel' => 'Users.User', + 'userScope' => array( + $controller->modelClass . '.active' => 1, + $controller->modelClass . '.email_authenticated' => 1), + 'cookieOptions' => array( + 'domain' => env('HTTP_HOST'), + 'name' => 'Users', + 'keyname' => 'rememberMe', + 'time' => '1 Month', + 'path' => '/' . $controller->base), + ); + parent::initialize($controller, array_merge($defaults, $settings)); + } + +/** + * Override for Auth::login to provide last login tracking and inject cookie checks and storage + * + * @param array $data Form data + * @return boolean True if login is successful + */ + public function login($data = null, $skipCookies = false) { + $loggedIn = + parent::login($data) || ( + !$skipCookies && + $this->_getCookie() + ); + if ($loggedIn) { + $User = $this->getModel(); + $User->id = $this->user($User->primaryKey); + $User->saveField('last_login', date('Y-m-d H:i:s')); + + $this->Session->setFlash(sprintf(__d('users', '%s, you have successfully logged in.', true), $this->user('username'))); + if (!empty($this->data)) { + !$skipCookies && $this->_setCookie(); + } + } + return $loggedIn; + } + +/** + * Destroy session and cookie information, and return the logoutRedirect URL + * + * @return string logoutRedirect url + */ + public function logout() { + $this->_deleteCookie(); + return parent::logout(); + } + +/** + * Setup the cookies with options provided the the UsersAuth setup. + * + * @return void + */ + protected function _setupCookies() { + // Allow only specified values set on the cookie + $validProperties = array('domain', 'key', 'name', 'path', 'secure', 'time'); + $options = array_intersect_key($this->cookieOptions, array_flip($validProperties)); + foreach ($options as $key => $value) { + $this->Cookie->{$key} = $value; + } + } + +/** + * Sets the cookie to remember the user + * + * @param array Cookie component properties as array, like array('domain' => 'yourdomain.com') + * @param string Cookie data keyname for the userdata, its default is "User". This is set to User and NOT using the model alias to make sure it works with different apps with different user models across different (sub)domains. + * @return void + * @link http://api13.cakephp.org/class/cookie-component + */ + protected function _setCookie() { + $this->_setupCookies(); + list($plugin, $model) = pluginSplit($this->userModel); + if (!isset($this->data[$model]['remember_me']) || !$this->data[$model]['remember_me']) { + $this->Cookie->delete($this->cookieOptions['keyname']); + return; + } + + $cookieData = array_intersect_key($this->data[$model], array_flip(array($this->fields['username'], $this->fields['password']))); + $this->Cookie->write($this->cookieOptions['keyname'], $cookieData); + } + +/** + * Attempts to automatically login the user if a valid cookie exists + * + * @return boolean True if successfully logged in + */ + protected function _getCookie() { + $this->_setupCookies(); + $cookieData = $this->Cookie->read($this->cookieOptions['keyname']); + + if ($cookieData === null) { + return false; + } + list($plugin, $model) = pluginSplit($this->userModel); + return $this->login(array($model => $cookieData), true); + } + +/** + * Delete the remember cookie. + * + * @return void + */ + protected function _deleteCookie() { + $this->_setupCookies(); + $this->Cookie->delete($this->cookieOptions['keyname']); + } +} diff --git a/controllers/details_controller.php b/controllers/details_controller.php old mode 100644 new mode 100755 diff --git a/controllers/users_controller.php b/controllers/users_controller.php old mode 100644 new mode 100755 index 3ba3e6f08..1f5d86a53 --- a/controllers/users_controller.php +++ b/controllers/users_controller.php @@ -29,14 +29,26 @@ class UsersController extends UsersAppController { * * @var array */ - public $helpers = array('Html', 'Form', 'Session', 'Time', 'Text', 'Utils.Gravatar'); + public $helpers = array( + 'Form', + 'Html', + 'Session', + 'Text', + 'Time', + ); /** * Components * * @var array */ - public $components = array('Auth', 'Session', 'Email', 'Cookie', 'Search.Prg'); + public $components = array( + 'Cookie', + 'Email', + 'Search.Prg', + 'Session', + 'Users.UsersAuth', + ); /** * $presetVars @@ -55,60 +67,31 @@ class UsersController extends UsersAppController { */ public function beforeFilter() { parent::beforeFilter(); - $this->Auth->allow('register', 'reset', 'verify', 'logout', 'index', 'view', 'reset_password'); + $this->Auth->allow('add', 'reset', 'verify', 'logout', 'index', 'view', 'reset_password', 'session', 'login'); - if ($this->action == 'register') { + if ($this->action == 'add') { $this->Auth->enabled = false; } if ($this->action == 'login') { + if ($this->Auth->user()) { + $this->Session->setFlash(__d('users', 'You are already logged in.', true)); + return $this->redirect($this->Auth->loginRedirect); + } $this->Auth->autoRedirect = false; } $this->set('model', $this->modelClass); - - if (!Configure::read('App.defaultEmail')) { - Configure::write('App.defaultEmail', 'noreply@' . env('HTTP_HOST')); - } } /** - * List of all users - * - * @return void + * redirect to dashboard + * @return void */ public function index() { - //$this->User->contain('Detail'); - $searchTerm = ''; - $this->Prg->commonProcess($this->modelClass, $this->modelClass, 'index', false); - - if (!empty($this->params['named']['search'])) { - if (!empty($this->params['named']['search'])) { - $searchTerm = $this->params['named']['search']; - } - $this->data[$this->modelClass]['search'] = $searchTerm; - } - - $this->paginate = array( - 'search', - 'limit' => 12, - 'order' => $this->modelClass . '.username ASC', - 'by' => $searchTerm, - 'conditions' => array( - 'OR' => array( - 'AND' => array( - $this->modelClass . '.active' => 1, - $this->modelClass . '.email_authenticated' => 1)))); - - - $this->set('users', $this->paginate($this->modelClass)); - $this->set('searchTerm', $searchTerm); - - if (!isset($this->params['named']['sort'])) { - $this->params['named']['sort'] = 'username'; - } + $this->redirect(array('action'=>'dashboard')); } - + /** * The homepage of a users giving him an overview about everything * @@ -140,7 +123,7 @@ public function view($slug = null) { * @param string $id User ID * @return void */ - public function edit() { + public function edit($slug) { if (!empty($this->data)) { if ($this->User->Detail->saveSection($this->Auth->user('id'), $this->data, 'User')) { $this->Session->setFlash(__d('users', 'Profile saved.', true)); @@ -148,9 +131,17 @@ public function edit() { $this->Session->setFlash(__d('users', 'Could not save your profile.', true)); } } else { + try { + $this->data = $this->User->view($slug); + if($this->Auth->user('slug') != $this->data[$this->modelClass]['slug']){ + $this->redirect('/'); + } + } catch (Exception $e) { + $this->Session->setFlash($e->getMessage()); + $this->redirect('/'); + } $this->data = $this->User->read(null, $this->Auth->user('id')); } - $this->_setLanguages(); } @@ -180,7 +171,7 @@ public function admin_index() { public function admin_view($id = null) { if (!$id) { $this->Session->setFlash(__d('users', 'Invalid User.', true)); - $this->redirect(array('action'=>'index')); + return $this->redirect(array('action' => 'index')); } $this->set('user', $this->User->read(null, $id)); } @@ -192,7 +183,7 @@ public function admin_view($id = null) { */ public function admin_add() { if ($this->User->add($this->data)) { - $this->Session->setFlash(__d('users', 'The User has been saved', true)); + $this->Session->setFlash(__d('users', 'User saved.', true)); $this->redirect(array('action' => 'index')); } } @@ -207,7 +198,7 @@ public function admin_edit($userId = null) { try { $result = $this->User->edit($userId, $this->data); if ($result === true) { - $this->Session->setFlash(__d('users', 'User saved', true)); + $this->Session->setFlash(__d('users', 'User saved.', true)); $this->redirect(array('action' => 'index')); } else { $this->data = $result; @@ -230,9 +221,9 @@ public function admin_edit($userId = null) { */ public function admin_delete($userId = null) { if ($this->User->delete($userId)) { - $this->Session->setFlash(__d('users', 'User deleted', true)); + $this->Session->setFlash(__d('users', 'User deleted.', true)); } else { - $this->Session->setFlash(__d('users', 'Invalid User', true)); + $this->Session->setFlash(__d('users', 'Invalid User.', true)); } $this->redirect(array('action' => 'index')); @@ -252,10 +243,10 @@ public function admin_search() { * * @return void */ - public function register() { + public function add() { if ($this->Auth->user()) { - $this->Session->setFlash(__d('users', 'You are already registered and logged in!', true)); - $this->redirect('/'); + $this->Session->setFlash(__d('users', 'You are already registered and logged in.', true)); + return $this->redirect($this->Auth->loginRedirect); } if (!empty($this->data)) { @@ -264,7 +255,7 @@ public function register() { $this->set('user', $user); $this->_sendVerificationEmail($user[$this->modelClass]['email']); $this->Session->setFlash(__d('users', 'Your account has been created. You should receive an e-mail shortly to authenticate your account. Once validated you will be able to login.', true)); - $this->redirect(array('action'=> 'login')); + return $this->redirect(array('action' => 'login')); } else { unset($this->data[$this->modelClass]['passwd']); unset($this->data[$this->modelClass]['temppassword']); @@ -273,39 +264,35 @@ public function register() { } $this->_setLanguages(); + + // Render the OpenID form if that data is present + $oid = $this->Session->read('openIdAuthData'); + if ($oid) { + $this->autoRender = false; + $this->set('openIdAuthData', $oid); + $this->render('openid_add'); + } } /** - * Common login action + * Login action + * + * Checks for posted login information, as well as processing cookie + * information if present, to automatically login the user. * * @return void */ public function login() { - if ($this->Auth->user()) { - $this->User->id = $this->Auth->user('id'); - $this->User->saveField('last_login', date('Y-m-d H:i:s')); - + if ($this->Auth->user() || $this->Auth->login()) { if ($this->here == $this->Auth->loginRedirect) { $this->Auth->loginRedirect = '/'; } - - $this->Session->setFlash(sprintf(__d('users', '%s you have successfully logged in', true), $this->Auth->user('username'))); - if (!empty($this->data)) { - $data = $this->data[$this->modelClass]; - $this->_setCookie(); - } - - if (empty($data['return_to'])) { - $data['return_to'] = null; - } - $this->redirect($this->Auth->redirect($data['return_to'])); - } - - if (isset($this->params['named']['return_to'])) { - $this->set('return_to', urldecode($this->params['named']['return_to'])); - } else { - $this->set('return_to', false); + $data = $this->data[$this->modelClass]; + $url = !empty($data['return_to']) ? $data['return_to'] : null; + return $this->redirect($this->Auth->redirect($url)); } + $return_to = isset($this->params['named']['return_to']) ? urldecode($this->params['named']['return_to']) : false; + $this->set('return_to', $return_to); } /** @@ -337,92 +324,81 @@ public function search() { 'by' => $by, 'search' => $searchTerm, 'conditions' => array( - 'AND' => array( - $this->modelClass . '.active' => 1, - $this->modelClass . '.email_authenticated' => 1))); + $this->modelClass . '.active' => 1, + $this->modelClass . '.email_authenticated' => 1)); $this->set('users', $this->paginate($this->modelClass)); $this->set('searchTerm', $searchTerm); } /** - * Common logout action + * Logout action * * @return void */ public function logout() { - $message = sprintf(__d('users', '%s you have successfully logged out', true), $this->Auth->user('username')); + // Message is created first, to grab authentication information before destroying session + $message = sprintf(__d('users', '%s, you have successfully logged out.', true), $this->Auth->user('username')); + $this->Session->destroy(); - $this->Cookie->destroy(); - $this->Session->setFlash($message); $this->redirect($this->Auth->logout()); } /** - * Confirm email action + * Confirm email action and password reset action * * @param string $type Type * @return void */ - public function verify($type = 'email') { - if (isset($this->passedArgs['1'])){ - $token = $this->passedArgs['1']; - } else { - $this->redirect(array('action' => 'login'), null, true); + public function verify($type = 'email', $token = null) { + $verifyTypes = array('email', 'reset'); + if (!$token || !in_array($type, $verifyTypes)) { + $this->Session->setFlash(__d('users', 'The url you have accessed is no longer valid.', true)); } - if ($type === 'email') { - $data = $this->User->validateToken($token); - } elseif($type === 'reset') { - $data = $this->User->validateToken($token, true); - } else { - $this->Session->setFlash(__d('users', 'There url you accessed is not longer valid', true)); - $this->redirect('/'); + $data = $this->User->validateToken($token, $type === 'reset'); + if (!$data) { + $this->Session->setFlash(__d('users', 'The url you have accessed is no longer valid', true)); + return $this->redirect('/'); } - if ($data !== false) { - $email = $data[$this->modelClass]['email']; - unset($data[$this->modelClass]['email']); - - if ($type === 'reset') { - $newPassword = $data[$this->modelClass]['passwd']; - $data[$this->modelClass]['passwd'] = $this->Auth->password($newPassword); - } + $email = $data[$this->modelClass]['email']; + unset($data[$this->modelClass]['email']); - if ($type === 'email') { - $data[$this->modelClass]['active'] = 1; - } + if ($type === 'reset') { + $newPassword = $data[$this->modelClass]['passwd']; + $data[$this->modelClass]['passwd'] = $this->Auth->password($newPassword); + } + if ($type === 'email') { + $data[$this->modelClass]['active'] = 1; + } - if ($this->User->save($data, false)) { - if ($type === 'reset') { - $this->Email->to = $email; - $this->Email->from = Configure::read('App.defaultEmail'); - $this->Email->replyTo = Configure::read('App.defaultEmail'); - $this->Email->return = Configure::read('App.defaultEmail'); - $this->Email->subject = env('HTTP_HOST') . ' ' . __d('users', 'Password Reset', true); - $this->Email->template = null; - $content[] = __d('users', 'Your password has been reset', true); - $content[] = __d('users', 'Please login using this password and change your password', true); - $content[] = $newPassword; - $this->Email->send($content); - $this->Session->setFlash(__d('users', 'Your password was sent to your registered email account', true)); - $this->redirect(array('action' => 'login')); - } else { - unset($data); - $data[$this->modelClass]['active'] = 1; - $this->User->save($data); - $this->Session->setFlash(__d('users', 'Your e-mail has been validated!', true)); - $this->redirect(array('action' => 'login')); - } + if ($this->User->save($data, false)) { + if ($type === 'reset') { + + $content[] = __d('users', 'Your password has been reset.', true); + $content[] = __d('users', 'Please login using this password and change your password.', true); + $content[] = $newPassword; + + $this->__sendEmail($email, array( + 'subject' => env('HTTP_HOST') . ' ' . __d('users', 'Password Reset', true), + 'template' => null, + 'content' => $content + )); + + $this->Session->setFlash(__d('users', 'Your password has been sent to your registered email address.', true)); } else { - $this->Session->setFlash(__d('users', 'There was an error trying to validate your e-mail address. Please check your e-mail for the URL you should use to verify your e-mail address.', true)); - $this->redirect('/'); + unset($data); + $data[$this->modelClass]['active'] = 1; + $this->User->save($data); + $this->Session->setFlash(__d('users', 'Your e-mail has been validated. You may now login.', true)); } - } else { - $this->Session->setFlash(__d('users', 'The url you accessed is not longer valid', true)); - $this->redirect('/'); + return $this->redirect(array('action' => 'login')); } + + $this->Session->setFlash(__d('users', 'There was an error verifying your account. Please check the email you were sent, and retry the verification link.', true)); + $this->redirect('/'); } /** @@ -434,8 +410,8 @@ public function change_password() { if (!empty($this->data)) { $this->data[$this->modelClass]['id'] = $this->Auth->user('id'); if ($this->User->changePassword($this->data)) { - $this->Session->setFlash(__d('users', 'Password changed.', true)); - $this->redirect('/'); + $this->Session->setFlash(__d('users', 'Your password was successfully changed.', true)); + $this->redirect(array('action' => 'dashboard')); } } } @@ -488,19 +464,13 @@ protected function _setLanguages($viewVar = 'languages') { */ protected function _sendVerificationEmail($to = null, $options = array()) { $defaults = array( - 'from' => 'noreply@' . env('HTTP_HOST'), 'subject' => __d('users', 'Account verification', true), - 'template' => 'account_verification'); - + 'template' => 'account_verification' + ); $options = array_merge($defaults, $options); - - $this->Email->to = $to; - $this->Email->from = $options['from']; - $this->Email->subject = $options['subject']; - $this->Email->template = $options['template']; - - return $this->Email->send(); + return $this->__sendEmail($to, $options); } + /** * Checks if the email is in the system and authenticated, if yes create the token @@ -512,10 +482,8 @@ protected function _sendVerificationEmail($to = null, $options = array()) { */ protected function _sendPasswordReset($admin = null, $options = array()) { $defaults = array( - 'from' => 'noreply@' . env('HTTP_HOST'), 'subject' => __d('users', 'Password Reset', true), 'template' => 'password_reset_request'); - $options = array_merge($defaults, $options); if (!empty($this->data)) { @@ -523,60 +491,24 @@ protected function _sendPasswordReset($admin = null, $options = array()) { if (!empty($user)) { $this->set('token', $user[$this->modelClass]['password_token']); - $this->Email->to = $user[$this->modelClass]['email']; - $this->Email->from = $options['from']; - $this->Email->subject = $options['subject']; - $this->Email->template = $options['template']; - - $this->Email->send(); + $this->__sendEmail( $user[$this->modelClass]['email'], $options); if ($admin) { $this->Session->setFlash(sprintf( - __d('users', '%s has been sent an email with instruction to reset their password.', true), + __d('users', '%s has been sent an email with instructions to reset their password.', true), $user[$this->modelClass]['email'])); - $this->redirect(array('action' => 'index', 'admin' => true)); + return $this->redirect(array('action' => 'index', 'admin' => true)); } else { - $this->Session->setFlash(__d('users', 'You should receive an email with further instructions shortly', true)); - $this->redirect(array('action' => 'login')); + $this->Session->setFlash(__d('users', 'Password reset requested. Please check your email for further instructions.', true)); + return $this->redirect(array('action' => 'login')); } } else { $this->Session->setFlash(__d('users', 'No user was found with that email.', true)); - $this->redirect('/'); + return $this->redirect(array('action' => 'reset_password')); } } $this->render('request_password_change'); } -/** - * Sets the cookie to remember the user - * - * @param array Cookie properties - * @return void - * @access protected - * @link http://api13.cakephp.org/class/cookie-component - */ - protected function _setCookie($options = array()) { - if (!isset($this->data[$this->modelClass]['remember_me'])) { - $this->Cookie->delete($this->modelClass); - } else { - $validProperties = array('domain', 'key', 'name', 'path', 'secure', 'time'); - $defaults = array( - 'name' => 'rememberMe'); - - $options = array_merge($defaults, $options); - foreach ($options as $key => $value) { - if (in_array($key, $validProperties)) { - $this->Cookie->{$key} = $value; - } - } - - $cookie = array(); - $cookie[$this->Auth->fields['username']] = $this->data[$this->modelClass][$this->Auth->fields['username']]; - $cookie[$this->Auth->fields['password']] = $this->data[$this->modelClass][$this->Auth->fields['password']]; - $this->Cookie->write($this->modelClass, $cookie, true, '1 Month'); - } - unset($this->data[$this->modelClass]['remember_me']); - } - /** * This method allows the user to change his password if the reset token is correct * @@ -586,7 +518,7 @@ protected function _setCookie($options = array()) { private function __resetPassword($token) { $user = $this->User->checkPasswordToken($token); if (empty($user)) { - $this->Session->setFlash(__d('users', 'Invalid password reset token, try again.', true)); + $this->Session->setFlash(__d('users', 'Invalid password reset token, please try again.', true)); $this->redirect(array('action' => 'reset_password')); } @@ -599,4 +531,41 @@ private function __resetPassword($token) { $this->set('token', $token); } + + private function __sendEmail($to, $options = array()){ + if(empty($to)) + trigger_error(__d('users','Invalid email address, please set email and try again.')); + $defaultOptions = array( + 'sendAs' => 'both', + 'subject' => 'system email', + 'template' => null, + 'layout' => null, + 'delivery' => 'smtp', + 'data' => null, + 'content' => null + ); + $options = array_merge($defaultOptions,$options); + Configure::load ( 'smtp' ); + $this->Email->reset (); + $this->Email->to = $to; + $this->Email->sendAs = $options['sendAs']; // because we like to send pretty mail + $this->Email->smtpOptions = Configure::read ( 'Email' ); + $this->Email->replyTo = Configure::read ( 'Email.fromHeader' ); + $this->Email->from = Configure::read ( 'Email.fromHeader' ); + $this->Email->return = Configure::read ( 'Email.from' ); + //regular email sending + $this->Email->subject = $options['subject']; + $this->Email->delivery = $options['delivery']; + //Set the body of the mail as we send it. + //Note: the text can be an array, each element will appear as a + //seperate line in the message body. + return $this->Email->send ($options['content'],$options['template'],$options['layout']); + } + + public function kill_session() { + if (Configure::read('debug')) { + $this->Session->destroy(); + return $this->redirect('/'); + } + } } diff --git a/license.txt b/license.txt old mode 100644 new mode 100755 diff --git a/locale/fre/LC_MESSAGES/users.po b/locale/fre/LC_MESSAGES/users.po old mode 100644 new mode 100755 diff --git a/locale/por/LC_MESSAGES/users.po b/locale/por/LC_MESSAGES/users.po new file mode 100755 index 000000000..92397305c --- /dev/null +++ b/locale/por/LC_MESSAGES/users.po @@ -0,0 +1,722 @@ +# LANGUAGE translation of the CakePHP Users plugin +# +# Copyright 2010, Cake Development Corporation (http://cakedc.com) +# +# Licensed under The MIT License +# Redistributions of files must retain the above copyright notice. +# +# @copyright Copyright 2010, Cake Development Corporation (http://cakedc.com) +# @license MIT License (http://www.opensource.org/licenses/mit-license.php) +# +msgid "" +msgstr "" +"Project-Id-Version: CakePHP Users Plugin\n" +"POT-Creation-Date: 2010-09-15 15:48+0200\n" +"PO-Revision-Date: 2010-09-23 19:54-0300\n" +"Last-Translator: Renan Gonçalves \n" +"Language-Team: CakeDC \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2;plural=n>1;\n" +"X-Poedit-Language: Portuguese\n" +"X-Poedit-Country: BRAZIL\n" + +#: /controllers/details_controller.php:57;138 +msgid "Invalid Detail." +msgstr "Detalhe inválido." + +#: /controllers/details_controller.php:78 +msgid "Saved" +msgstr "Salvo" + +#: /controllers/details_controller.php:96 +msgid "%s details saved" +msgstr "%s detalha salvo" + +#: /controllers/details_controller.php:113;196 +msgid "Invalid id for Detail" +msgstr "ID inválido para Detalhe" + +#: /controllers/details_controller.php:117;200 +msgid "Detail deleted" +msgstr "Detalhe removido" + +#: /controllers/details_controller.php:152;175 +msgid "The Detail has been saved" +msgstr "O Detalhe foi salvo" + +#: /controllers/details_controller.php:155;178 +msgid "The Detail could not be saved. Please, try again." +msgstr "O Detalhe não pode ser salvo. Por favor, tente novamente." + +#: /controllers/details_controller.php:170 +msgid "Invalid Detail" +msgstr "Detalhe inválido" + +#: /controllers/users_controller.php:157 +msgid "Profile saved." +msgstr "Perfil salvo." + +#: /controllers/users_controller.php:159 +msgid "Could not save your profile." +msgstr "Não foi possível salvar o perfil." + +#: /controllers/users_controller.php:193 +msgid "Invalid User." +msgstr "Usuário inválido." + +#: /controllers/users_controller.php:207 +msgid "The User has been saved" +msgstr "O Usuário foi saldo" + +#: /controllers/users_controller.php:223 +msgid "User saved" +msgstr "Usuário salvo" + +#: /controllers/users_controller.php:247 +msgid "User deleted" +msgstr "Usuário removido" + +#: /controllers/users_controller.php:249 +#: /models/user.php:703 +msgid "Invalid User" +msgstr "Usuário inválido" + +#: /controllers/users_controller.php:273 +msgid "You are already registered and logged in!" +msgstr "Você já está registrado e logado!" + +#: /controllers/users_controller.php:282 +#: /tests/cases/controllers/users_controller.test.php:194 +msgid "Your account has been created. You should receive an e-mail shortly to authenticate your account. Once validated you will be able to login." +msgstr "Sua conta foi salva. Você logo receberá um e-mail para autenticar sua conta. Uma vez validada você poderá logar." + +#: /controllers/users_controller.php:287 +#: /tests/cases/controllers/users_controller.test.php:205 +msgid "Your account could not be created. Please, try again." +msgstr "Sua conta não pode ser criada. Por favor, tente novamente." + +#: /controllers/users_controller.php:309 +msgid "%s you have successfully logged in" +msgstr "%s você se logou com sucesso" + +#: /controllers/users_controller.php:383 +msgid "%s you have successfully logged out" +msgstr "%s você saiu com sucesso" + +#: /controllers/users_controller.php:409 +msgid "There url you accessed is not longer valid" +msgstr "Essa url que você acessou não é mais válida" + +#: /controllers/users_controller.php:432;545 +msgid "Password Reset" +msgstr "Resetar senha" + +#: /controllers/users_controller.php:434 +msgid "Your password has been reset" +msgstr "Sua senha foi resetada" + +#: /controllers/users_controller.php:435 +msgid "Please login using this password and change your password" +msgstr "Por favor faça o login usando essa senha e então mude-a" + +#: /controllers/users_controller.php:438 +msgid "Your password was sent to your registered email account" +msgstr "Sua senha foi enviado para seu e-mail registrado em sua conta" + +#: /controllers/users_controller.php:444 +#: /tests/cases/controllers/users_controller.test.php:219 +msgid "Your e-mail has been validated!" +msgstr "Seu e-mail foi validado!" + +#: /controllers/users_controller.php:448 +msgid "There was an error trying to validate your e-mail address. Please check your e-mail for the URL you should use to verify your e-mail address." +msgstr "Houve um erro ao tentar validar o seu endereço de e-mail. Por favor, verifique seu e-mail pela URL que você deve usar para verificar o seu endereço de e-mail." + +#: /controllers/users_controller.php:452 +#: /tests/cases/controllers/users_controller.test.php:224 +msgid "The url you accessed is not longer valid" +msgstr "A url que você acessou não é mais válida" + +#: /controllers/users_controller.php:467 +msgid "Password changed." +msgstr "Senha alterada." + +#: /controllers/users_controller.php:521 +msgid "Account verification" +msgstr "Verificação de conta" + +#: /controllers/users_controller.php:563 +msgid "%s has been sent an email with instruction to reset their password." +msgstr "%s foi enviado um email com instruções para redefinir sua senha." + +#: /controllers/users_controller.php:567 +msgid "You should receive an email with further instructions shortly" +msgstr "Você deverá receber um email com mais instruções em breve" + +#: /controllers/users_controller.php:571 +msgid "No user was found with that email." +msgstr "Nenhum usuário com esse e-mail foi encontrado." + +#: /controllers/users_controller.php:588 +msgid "Invalid password reset token, try again." +msgstr "Chave para redefinição de senha inválida, tente novamente." + +#: /controllers/users_controller.php:594 +msgid "Password changed, you can now login with your new password." +msgstr "Senha alterada, você pode agora logar com sua nova senha." + +#: /models/user.php:102 +msgid "Please enter a username" +msgstr "Por favor entre o nome de usuário" + +#: /models/user.php:105 +msgid "The username must be alphanumeric" +msgstr "O nome de usuário deve ser alfanumérico" + +#: /models/user.php:108 +msgid "This username is already in use." +msgstr "Esse nome de usuário já está em uso." + +#: /models/user.php:111 +msgid "The username must have at least 3 characters." +msgstr "O nome de usuário deve ter no mínimo 3 caracteres." + +#: /models/user.php:116 +msgid "Please enter a valid email address." +msgstr "Por favor entre um endereço de e-mail válido." + +#: /models/user.php:119 +msgid "This email is already in use." +msgstr "Esse e-mail já está em uso." + +#: /models/user.php:123 +msgid "The password must have at least 8 characters." +msgstr "A senha deve ter no mínimo 8 caracteres." + +#: /models/user.php:126 +msgid "Please enter a password." +msgstr "Por favor entre a senha." + +#: /models/user.php:129 +msgid "The passwords are not equal, please try again." +msgstr "As senhas devem ser iguais, por favor tente novamente." + +#: /models/user.php:132 +msgid "You must agree to the terms of use." +msgstr "Você deve aceitar os termos de uso." + +#: /models/user.php:137;357 +msgid "The passwords are not equal." +msgstr "As senhas não são iguais." + +#: /models/user.php:139 +msgid "Invalid password." +msgstr "Senha inválida." + +#: /models/user.php:150 +msgid "Invalid date" +msgstr "Data inválida" + +#: /models/user.php:315 +msgid "This Email Address exists but was never validated." +msgstr "Esse endereço de e-mail existe mas nunca foi validado." + +#: /models/user.php:317 +msgid "This Email Address does not exist in the system." +msgstr "Esse endereço de e-mail não existe no sistema." + +#: /models/user.php:406 +msgid "$this->data['" +msgstr "$this->data['" + +#: /models/user.php:460 +msgid "The user does not exist." +msgstr "O usuário não existe." + +#: /models/user.php:505 +msgid "Please enter your email address." +msgstr "Por favor entre seu endereço de e-mail." + +#: /models/user.php:515 +msgid "The email address does not exist in the system" +msgstr "O endereço de e-mail não existe no sistema" + +#: /models/user.php:520 +msgid "Your account is already authenticaed." +msgstr "Sua conta já está autenticada." + +#: /models/user.php:525 +msgid "Your account is disabled." +msgstr "Sua conta foi desativada." + +#: /tests/cases/controllers/users_controller.test.php:34 +msgid "Sorry, but you need to login to access this location." +msgstr "Desculpe, mas você precisa logar para acessar esse local." + +#: /tests/cases/controllers/users_controller.test.php:35;174 +msgid "Invalid e-mail / password combination. Please try again" +msgstr "Combinação de e-mail/senha inválida. Por favor tente novamente." + +#: /tests/cases/controllers/users_controller.test.php:168 +msgid "testuser you have successfully logged in" +msgstr "" + +#: /tests/cases/controllers/users_controller.test.php:237 +msgid "floriank you have successfully logged out" +msgstr "" + +#: /views/details/add.ctp:4 +#: /views/details/admin_add.ctp:4 +msgid "Add Detail" +msgstr "Adicionar Detalhe" + +#: /views/details/add.ctp:17 +#: /views/details/admin_add.ctp:17 +#: /views/details/admin_edit.ctp:19 +#: /views/details/admin_view.ctp:45 +#: /views/details/view.ctp:45 +msgid "List Details" +msgstr "Listar Detalhes" + +#: /views/details/add.ctp:18 +#: /views/details/admin_add.ctp:18 +#: /views/details/admin_edit.ctp:20 +#: /views/details/admin_index.ctp:67 +#: /views/details/admin_view.ctp:47 +#: /views/details/view.ctp:47 +#: /views/users/add.ctp:15 +#: /views/users/admin_add.ctp:13 +#: /views/users/admin_edit.ctp:15 +#: /views/users/admin_view.ctp:25 +msgid "List Users" +msgstr "Listar Usuários" + +#: /views/details/add.ctp:19 +#: /views/details/admin_add.ctp:19 +#: /views/details/admin_edit.ctp:21 +#: /views/details/admin_index.ctp:68 +#: /views/details/admin_view.ctp:48 +#: /views/details/view.ctp:48 +#: /views/users/admin_view.ctp:26 +#: /views/users/index.ctp:46 +msgid "New User" +msgstr "Novo Usuário" + +#: /views/details/add.ctp:20 +#: /views/details/admin_add.ctp:20 +#: /views/details/admin_edit.ctp:22 +#: /views/details/admin_index.ctp:69 +#: /views/details/admin_view.ctp:49 +#: /views/details/view.ctp:49 +msgid "List Groups" +msgstr "Listar Grupos" + +#: /views/details/add.ctp:21 +#: /views/details/admin_add.ctp:21 +#: /views/details/admin_edit.ctp:23 +#: /views/details/admin_index.ctp:70 +#: /views/details/admin_view.ctp:50;95 +#: /views/details/view.ctp:50;95 +msgid "New Group" +msgstr "Novo Grupo" + +#: /views/details/admin_edit.ctp:4 +#: /views/details/admin_view.ctp:43 +#: /views/details/edit.ctp:5 +#: /views/details/view.ctp:43 +msgid "Edit Detail" +msgstr "Editar Detalhe" + +#: /views/details/admin_edit.ctp:18 +#: /views/details/admin_index.ctp:53 +#: /views/details/admin_view.ctp:86 +#: /views/details/view.ctp:86 +#: /views/users/admin_edit.ctp:14 +#: /views/users/admin_index.ctp:47 +#: /views/users/groups.ctp:38 +#: /views/users/index.ctp:33 +msgid "Delete" +msgstr "Remover" + +#: /views/details/admin_edit.ctp:18 +#: /views/details/admin_index.ctp:53 +#: /views/details/admin_view.ctp:44;86 +#: /views/details/view.ctp:44;86 +#: /views/users/admin_edit.ctp:14 +#: /views/users/admin_index.ctp:47 +#: /views/users/admin_view.ctp:24 +#: /views/users/index.ctp:33 +msgid "Are you sure you want to delete # %s?" +msgstr "Você tem certeza que deseja remover # %s?" + +#: /views/details/admin_index.ctp:2 +#: /views/users/register.ctp:4 +msgid "Details" +msgstr "Detalhes" + +#: /views/details/admin_index.ctp:6 +#: /views/users/index.ctp:6 +msgid "Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%" +msgstr "Página %page% de %pages%, mostrando %current% resultados de um total de %count%, começando em %start%, terminando em %end%" + +#: /views/details/admin_index.ctp:18 +#: /views/details/admin_view.ctp:65 +#: /views/details/view.ctp:65 +#: /views/users/admin_index.ctp:21 +#: /views/users/groups.ctp:15;50 +#: /views/users/index.ctp:13 +msgid "Actions" +msgstr "Ações" + +#: /views/details/admin_index.ctp:51 +#: /views/details/admin_view.ctp:84 +#: /views/details/view.ctp:84 +#: /views/users/admin_index.ctp:45 +#: /views/users/index.ctp:31 +msgid "View" +msgstr "Visualizar" + +#: /views/details/admin_index.ctp:52 +#: /views/details/admin_view.ctp:85 +#: /views/details/view.ctp:85 +#: /views/users/admin_index.ctp:46 +#: /views/users/groups.ctp:33 +#: /views/users/index.ctp:32 +msgid "Edit" +msgstr "Editar" + +#: /views/details/admin_index.ctp:60 +#: /views/users/index.ctp:40 +msgid "previous" +msgstr "anterior" + +#: /views/details/admin_index.ctp:62 +#: /views/users/index.ctp:42 +msgid "next" +msgstr "próximo" + +#: /views/details/admin_index.ctp:66 +#: /views/details/admin_view.ctp:46 +#: /views/details/view.ctp:46 +msgid "New Detail" +msgstr "Novo Detalhe" + +#: /views/details/admin_view.ctp:2 +#: /views/details/view.ctp:2 +msgid "Detail" +msgstr "Detalhe" + +#: /views/details/admin_view.ctp:4;58 +#: /views/details/view.ctp:4;58 +msgid "Id" +msgstr "Id" + +#: /views/details/admin_view.ctp:9 +#: /views/details/view.ctp:9 +#: /views/users/admin_view.ctp:2 +#: /views/users/view.ctp:2 +msgid "User" +msgstr "Usuário" + +#: /views/details/admin_view.ctp:14 +#: /views/details/view.ctp:14 +msgid "Position" +msgstr "Posição" + +#: /views/details/admin_view.ctp:19 +#: /views/details/view.ctp:19 +msgid "Field" +msgstr "Campo" + +#: /views/details/admin_view.ctp:24 +#: /views/details/view.ctp:24 +msgid "Value" +msgstr "Valor" + +#: /views/details/admin_view.ctp:29;63 +#: /views/details/view.ctp:29;63 +#: /views/users/admin_view.ctp:9 +#: /views/users/view.ctp:9 +msgid "Created" +msgstr "Criação" + +#: /views/details/admin_view.ctp:34;64 +#: /views/details/view.ctp:34;64 +#: /views/users/admin_view.ctp:14 +msgid "Modified" +msgstr "Atualização" + +#: /views/details/admin_view.ctp:44 +#: /views/details/view.ctp:44 +msgid "Delete Detail" +msgstr "Remover Detalhe" + +#: /views/details/admin_view.ctp:54 +#: /views/details/view.ctp:54 +msgid "Related Groups" +msgstr "Grupos relacionados" + +#: /views/details/admin_view.ctp:59 +#: /views/details/view.ctp:59 +msgid "User Id" +msgstr "Id de Usuário" + +#: /views/details/admin_view.ctp:60 +#: /views/details/view.ctp:60 +msgid "Is Public" +msgstr "Público" + +#: /views/details/admin_view.ctp:61 +#: /views/details/view.ctp:61 +#: /views/users/groups.ctp:13;47 +#: /views/users/search.ctp:9 +msgid "Name" +msgstr "Nome" + +#: /views/details/admin_view.ctp:62 +#: /views/details/view.ctp:62 +#: /views/users/groups.ctp:48 +msgid "Description" +msgstr "Descrição" + +#: /views/details/index.ctp:17 +#: /views/users/change_password.ctp:16 +#: /views/users/login.ctp:13 +#: /views/users/register.ctp:33;89 +#: /views/users/request_password_change.ctp:12 +#: /views/users/reset_password.ctp:14 +msgid "Submit" +msgstr "Enviar" + +#: /views/elements/login.ctp:11 +#: /views/users/admin_index.ctp:10 +#: /views/users/login.ctp:8 +#: /views/users/register.ctp:71;78 +#: /views/users/search.ctp:7 +msgid "Email" +msgstr "E-mail" + +#: /views/elements/login.ctp:13 +#: /views/users/login.ctp:10 +#: /views/users/register.ctp:19 +msgid "Password" +msgstr "Senha" + +#: /views/elements/login.ctp:15 +#: /views/users/login.ctp:1;3 +msgid "Login" +msgstr "Login" + +#: /views/elements/email/text/account_verification.ctp:2 +msgid "Hello %s," +msgstr "Olá %s," + +#: /views/elements/email/text/account_verification.ctp:4 +msgid "to validate your account, you must visit the URL below within 24 hours" +msgstr "para validar a sua conta, você deve visitar a URL abaixo no prazo de 24 horas" + +#: /views/elements/email/text/password_reset_request.ctp:2 +msgid "A request to reset your password was sent. To change your password click the link below." +msgstr "Uma solicitação para redefinir sua senha foi enviada. Para alterar sua senha, clique no link abaixo." + +#: /views/users/add.ctp:4 +#: /views/users/admin_add.ctp:4 +msgid "Add User" +msgstr "Adicionar Usuário" + +#: /views/users/admin_edit.ctp:4 +#: /views/users/admin_view.ctp:23 +#: /views/users/edit.ctp:3 +msgid "Edit User" +msgstr "Editar Usuário" + +#: /views/users/admin_index.ctp:2 +#: /views/users/index.ctp:2 +msgid "Users" +msgstr "Usuários" + +#: /views/users/admin_index.ctp:4 +msgid "Filter" +msgstr "Filtro" + +#: /views/users/admin_index.ctp:8 +#: /views/users/admin_view.ctp:4 +#: /views/users/register.ctp:57;63 +#: /views/users/search.ctp:5 +#: /views/users/view.ctp:4 +msgid "Username" +msgstr "Nome de usuário" + +#: /views/users/admin_index.ctp:11 +#: /views/users/search.ctp:10 +msgid "Search" +msgstr "Buscar" + +#: /views/users/admin_view.ctp:24 +msgid "Delete User" +msgstr "Remover Usuário" + +#: /views/users/change_password.ctp:1 +msgid "Change your password" +msgstr "Altera sua senha" + +#: /views/users/change_password.ctp:3 +msgid "Please enter your old password because of security reasons and then your new password twice." +msgstr "Por favor digite sua senha antiga por razões de segurança e depois sua nova senha duas vezes." + +#: /views/users/change_password.ctp:8 +msgid "Old Password" +msgstr "Antiga senha" + +#: /views/users/change_password.ctp:11 +#: /views/users/reset_password.ctp:9 +msgid "New Password" +msgstr "Nova senha" + +#: /views/users/change_password.ctp:14 +#: /views/users/reset_password.ctp:12 +msgid "Confirm" +msgstr "Confirmar" + +#: /views/users/dashboard.ctp:2 +msgid "Welcome" +msgstr "Bem-vindo" + +#: /views/users/dashboard.ctp:3 +msgid "Recent broadcasts" +msgstr "Atualizações recentes" + +#: /views/users/groups.ctp:2 +msgid "My Groups" +msgstr "Meus Grupos" + +#: /views/users/groups.ctp:5 +msgid "Create a new group" +msgstr "Criar um novo grupo" + +#: /views/users/groups.ctp:6 +msgid "Invite a user" +msgstr "Convide um usuário" + +#: /views/users/groups.ctp:7 +msgid "Requests to join" +msgstr "Requisite para participar" + +#: /views/users/groups.ctp:10 +msgid "My own groups" +msgstr "Meus próprios grupos" + +#: /views/users/groups.ctp:14;49 +msgid "Members" +msgstr "Membros" + +#: /views/users/groups.ctp:34 +msgid "Invite user" +msgstr "Convite um usuário" + +#: /views/users/groups.ctp:35 +msgid "Manage Broadcast Scope" +msgstr "Gerenciar escopo atualizações" + +#: /views/users/groups.ctp:36 +msgid "Access" +msgstr "Acesso" + +#: /views/users/groups.ctp:37 +msgid "Addons" +msgstr "Módulos" + +#: /views/users/groups.ctp:44 +msgid "Groups im a member in" +msgstr "Grupos em que sou membro" + +#: /views/users/groups.ctp:68 +msgid "Leave group" +msgstr "Deixar grupo" + +#: /views/users/login.ctp:11 +msgid "Remember Me" +msgstr "Lembre-me" + +#: /views/users/register.ctp:2 +msgid "Account registration" +msgstr "Registro de conta" + +#: /views/users/register.ctp:10 +msgid "Please select a username that is not already in use" +msgstr "Por favor selecione um nome de usuário que não esteja em uso" + +#: /views/users/register.ctp:11 +msgid "Must be at least 3 characters" +msgstr "Tem que ter no mínimo 3 caracteres" + +#: /views/users/register.ctp:12 +msgid "Username must contain numbers and letters only" +msgstr "Nome de usuário devem conter apenas números e letras" + +#: /views/users/register.ctp:13 +msgid "Please choose username" +msgstr "Por favor escolha o nome de usuário" + +#: /views/users/register.ctp:15 +msgid "E-mail (used as login)" +msgstr "E-mail (usado para logar)" + +#: /views/users/register.ctp:16 +msgid "Must be a valid email address" +msgstr "Deve ser um endereço de e-mail válido" + +#: /views/users/register.ctp:17 +msgid "An account with that email already exists" +msgstr "Já existe uma conta com esse e-mail" + +#: /views/users/register.ctp:21 +msgid "Must be at least 5 characters long" +msgstr "Deve ter pelo menos 5 caracteres" + +#: /views/users/register.ctp:23 +msgid "Password (confirm)" +msgstr "Senha (confirmação)" + +#: /views/users/register.ctp:25 +msgid "Passwords must match" +msgstr "As senhas devem ser iguais" + +#: /views/users/register.ctp:29;85 +msgid "I have read and agreed to " +msgstr "Eu li e aceito em" + +#: /views/users/register.ctp:29;85 +msgid "Terms of Service" +msgstr "Termos de Serviço" + +#: /views/users/register.ctp:30;86 +msgid "You must verify you have read the Terms of Service" +msgstr "Você deve verificar se você leu os Termos de Serviços" + +#: /views/users/register.ctp:46 +msgid "Openid Identifier" +msgstr "Identificador OpenId" + +#: /views/users/request_password_change.ctp:1 +msgid "Forgot your password?" +msgstr "Esqueceu sua senha?" + +#: /views/users/request_password_change.ctp:3 +msgid "Please enter the email you used for registration and you'll get an email with further instructions." +msgstr "Por favor entre com o e-mail usado no registro e você irá receber um e-mail com mais instruções." + +#: /views/users/request_password_change.ctp:11 +msgid "Your Email" +msgstr "Seu E-mail" + +#: /views/users/reset_password.ctp:1 +msgid "Reset your password" +msgstr "Redefinir sua senha" + +#: /views/users/search.ctp:1 +msgid "Search for users" +msgstr "Procurar por usuários" + diff --git a/locale/rus/LC_MESSAGES/users.po b/locale/rus/LC_MESSAGES/users.po new file mode 100755 index 000000000..3c02b5e58 --- /dev/null +++ b/locale/rus/LC_MESSAGES/users.po @@ -0,0 +1,711 @@ +msgid "" +msgstr "" +"Project-Id-Version: CakePHP Users Plugin\n" +"POT-Creation-Date: 2010-09-16 16:33+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: Evgeny Tomenko \n" +"Language-Team: CakeDC\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Russian\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: /controllers/details_controller.php:57;138 +msgid "Invalid Detail." +msgstr "Неверные данные." + +#: /controllers/details_controller.php:78 +msgid "Saved" +msgstr "Сохренено" + +#: /controllers/details_controller.php:96 +msgid "%s details saved" +msgstr "%s параметр соханен" + +#: /controllers/details_controller.php:113;196 +msgid "Invalid id for Detail" +msgstr "Неверные данные." + +#: /controllers/details_controller.php:117;200 +msgid "Detail deleted" +msgstr "Данные удалены." + +#: /controllers/details_controller.php:152;175 +msgid "The Detail has been saved" +msgstr "Данные сохранены." + +#: /controllers/details_controller.php:155;178 +msgid "The Detail could not be saved. Please, try again." +msgstr "Данные не удалось сохранить." + +#: /controllers/details_controller.php:170 +msgid "Invalid Detail" +msgstr "Неверные данные" + +#: /controllers/users_controller.php:157 +msgid "Profile saved." +msgstr "Профиль обновлен" + +#: /controllers/users_controller.php:159 +msgid "Could not save your profile." +msgstr "Профиль сохранить не удалось." + +#: /controllers/users_controller.php:193 +msgid "Invalid User." +msgstr "Неуществующий пользователь." + +#: /controllers/users_controller.php:207 +msgid "The User has been saved" +msgstr "Пользователь был" + +#: /controllers/users_controller.php:223 +msgid "User saved" +msgstr "Данные пользователя сохранены" + +#: /controllers/users_controller.php:247 +msgid "User deleted" +msgstr "Данные о пользователе удалены" + +#: /controllers/users_controller.php:249 +#: /models/user.php:703 +msgid "Invalid User" +msgstr "Неуществующий пользователь" + +#: /controllers/users_controller.php:273 +msgid "You are already registered and logged in!" +msgstr "Вы уже зарегистрированы и авторизованы!" + +#: /controllers/users_controller.php:282 +#: /tests/cases/controllers/users_controller.test.php:194 +msgid "Your account has been created. You should receive an e-mail shortly to authenticate your account. Once validated you will be able to login." +msgstr "Учетная запись успешно создана. Скоро вы получите e-mail, с помощью которого можно подтвердить аккаунт." + +#: /controllers/users_controller.php:287 +#: /tests/cases/controllers/users_controller.test.php:205 +msgid "Your account could not be created. Please, try again." +msgstr "Учетную запись создать не удалось. Попробуйте позднее." + +#: /controllers/users_controller.php:309 +msgid "%s you have successfully logged in" +msgstr "%s, вы успешно авторизовались." + +#: /controllers/users_controller.php:383 +msgid "%s you have successfully logged out" +msgstr "%s, вы успешно покинули систему." + +#: /controllers/users_controller.php:409 +msgid "There url you accessed is not longer valid" +msgstr "Данная ссылка не доступна." + +#: /controllers/users_controller.php:432;545 +msgid "Password Reset" +msgstr "Сбросить пароль" + +#: /controllers/users_controller.php:434 +msgid "Your password has been reset" +msgstr "Ваш пароль был сброшен" + +#: /controllers/users_controller.php:435 +msgid "Please login using this password and change your password" +msgstr "Пожалуйста авторизуйтесь и измените пароль" + +#: /controllers/users_controller.php:438 +msgid "Your password was sent to your registered email account" +msgstr "Ваш пароль был отправлен на ваш почтовый адрес." + +#: /controllers/users_controller.php:444 +#: /tests/cases/controllers/users_controller.test.php:219 +msgid "Your e-mail has been validated!" +msgstr "Ваш e-mail был подтвержен!" + +#: /controllers/users_controller.php:448 +msgid "There was an error trying to validate your e-mail address. Please check your e-mail for the URL you should use to verify your e-mail address." +msgstr "При попытке подтвердить ваш электронный адрес произошла ошибка. Убедитесь что вы используете правильную ссылку для подтверждения своего почтового адреса." + +#: /controllers/users_controller.php:452 +#: /tests/cases/controllers/users_controller.test.php:224 +msgid "The url you accessed is not longer valid" +msgstr "Данный адрес более не доступен." + +#: /controllers/users_controller.php:467 +msgid "Password changed." +msgstr "Пароль изменен." + +#: /controllers/users_controller.php:521 +msgid "Account verification" +msgstr "Проверка учетной записи" + +#: /controllers/users_controller.php:563 +msgid "%s has been sent an email with instruction to reset their password." +msgstr "%s. Вам была отправлена инструкция для сброса пароля." + +#: /controllers/users_controller.php:567 +msgid "You should receive an email with further instructions shortly" +msgstr "Вскоре вы получите письмо с дальнейшими инстукциями." + +#: /controllers/users_controller.php:571 +msgid "No user was found with that email." +msgstr "С данным почтовым адресом не зарегистрирован ни один пользователь." + +#: /controllers/users_controller.php:588 +msgid "Invalid password reset token, try again." +msgstr "Неверный код сброса пароля, попробуйте еще раз." + +#: /controllers/users_controller.php:594 +msgid "Password changed, you can now login with your new password." +msgstr "Пароль изменен, вы можете авторизоваться с вашим новым паролем." + +#: /models/user.php:102 +msgid "Please enter a username" +msgstr "Задайте имя пользователя" + +#: /models/user.php:105 +msgid "The username must be alphanumeric" +msgstr "Имя пользователя должно snm буквенно-цифровым." + +#: /models/user.php:108 +msgid "This username is already in use." +msgstr "Данное имя пользователя уже используется." + +#: /models/user.php:111 +msgid "The username must have at least 3 characters." +msgstr "Имя пользователя должено содержать как минимум 3 символа." + +#: /models/user.php:116 +msgid "Please enter a valid email address." +msgstr "Введите допустимый почтовый адрес." + +#: /models/user.php:119 +msgid "This email is already in use." +msgstr "Данный почтовый адрес занят." + +#: /models/user.php:123 +msgid "The password must have at least 8 characters." +msgstr "Длина пароль должена быть не менее 8 символов." + +#: /models/user.php:126 +msgid "Please enter a password." +msgstr "Введите пароль." + +#: /models/user.php:129 +msgid "The passwords are not equal, please try again." +msgstr "Пароли не совпадают, попробуйте еще раз." + +#: /models/user.php:132 +msgid "You must agree to the terms of use." +msgstr "Вы должны подтвердить согласие с правилами пользования сервисом." + +#: /models/user.php:137;357 +msgid "The passwords are not equal." +msgstr "Пароли не совпадают." + +#: /models/user.php:139 +msgid "Invalid password." +msgstr "Неверный пароль." + +#: /models/user.php:150 +msgid "Invalid date" +msgstr "Неверная дата" + +#: /models/user.php:315 +msgid "This Email Address exists but was never validated." +msgstr "Почтовый адрес существует, но не подтвержден." + +#: /models/user.php:317 +msgid "This Email Address does not exist in the system." +msgstr "Почтовый адрес системе не известен." + +#: /models/user.php:406 +msgid "$this->data['" +msgstr "" + +#: /models/user.php:460 +msgid "The user does not exist." +msgstr "Пользователь не существует." + +#: /models/user.php:505 +msgid "Please enter your email address." +msgstr "Пожалуйста, заполните почтовый адрес" + +#: /models/user.php:515 +msgid "The email address does not exist in the system" +msgstr "Данный почтовый адрес системе не известен." + +#: /models/user.php:520 +msgid "Your account is already authenticaed." +msgstr "Ваша учетная запись уже подтверждена." + +#: /models/user.php:525 +msgid "Your account is disabled." +msgstr "Ваша учетная запись заблокирована." + +#: /tests/cases/controllers/users_controller.test.php:34 +msgid "Sorry, but you need to login to access this location." +msgstr "Вы должны авторизоваться, чтобы получить доступ к данной странице." + +#: /tests/cases/controllers/users_controller.test.php:35;174 +msgid "Invalid e-mail / password combination. Please try again" +msgstr "Неверный комбинация email и пароля, попробуйте еще раз." + +#: /tests/cases/controllers/users_controller.test.php:168 +msgid "testuser you have successfully logged in" +msgstr "testuser вы успешно авторизовались" + +#: /tests/cases/controllers/users_controller.test.php:237 +msgid "floriank you have successfully logged out" +msgstr "floriank вы успешно завершили сессию" + +#: /views/details/add.ctp:4 +#: /views/details/admin_add.ctp:4 +msgid "Add Detail" +msgstr "Добавить данные" + +#: /views/details/add.ctp:17 +#: /views/details/admin_add.ctp:17 +#: /views/details/admin_edit.ctp:19 +#: /views/details/admin_view.ctp:45 +#: /views/details/view.ctp:45 +msgid "List Details" +msgstr "Список данных" + +#: /views/details/add.ctp:18 +#: /views/details/admin_add.ctp:18 +#: /views/details/admin_edit.ctp:20 +#: /views/details/admin_index.ctp:67 +#: /views/details/admin_view.ctp:47 +#: /views/details/view.ctp:47 +#: /views/users/add.ctp:15 +#: /views/users/admin_add.ctp:13 +#: /views/users/admin_edit.ctp:15 +#: /views/users/admin_view.ctp:25 +msgid "List Users" +msgstr "Список пользователей" + +#: /views/details/add.ctp:19 +#: /views/details/admin_add.ctp:19 +#: /views/details/admin_edit.ctp:21 +#: /views/details/admin_index.ctp:68 +#: /views/details/admin_view.ctp:48 +#: /views/details/view.ctp:48 +#: /views/users/admin_view.ctp:26 +#: /views/users/index.ctp:46 +msgid "New User" +msgstr "Новый пользователь" + +#: /views/details/add.ctp:20 +#: /views/details/admin_add.ctp:20 +#: /views/details/admin_edit.ctp:22 +#: /views/details/admin_index.ctp:69 +#: /views/details/admin_view.ctp:49 +#: /views/details/view.ctp:49 +msgid "List Groups" +msgstr "Список групп" + +#: /views/details/add.ctp:21 +#: /views/details/admin_add.ctp:21 +#: /views/details/admin_edit.ctp:23 +#: /views/details/admin_index.ctp:70 +#: /views/details/admin_view.ctp:50;95 +#: /views/details/view.ctp:50;95 +msgid "New Group" +msgstr "Новая группа" + +#: /views/details/admin_edit.ctp:4 +#: /views/details/admin_view.ctp:43 +#: /views/details/edit.ctp:5 +#: /views/details/view.ctp:43 +msgid "Edit Detail" +msgstr "Редактировать данные" + +#: /views/details/admin_edit.ctp:18 +#: /views/details/admin_index.ctp:53 +#: /views/details/admin_view.ctp:86 +#: /views/details/view.ctp:86 +#: /views/users/admin_edit.ctp:14 +#: /views/users/admin_index.ctp:47 +#: /views/users/groups.ctp:38 +#: /views/users/index.ctp:33 +msgid "Delete" +msgstr "Удалить" + +#: /views/details/admin_edit.ctp:18 +#: /views/details/admin_index.ctp:53 +#: /views/details/admin_view.ctp:44;86 +#: /views/details/view.ctp:44;86 +#: /views/users/admin_edit.ctp:14 +#: /views/users/admin_index.ctp:47 +#: /views/users/admin_view.ctp:24 +#: /views/users/index.ctp:33 +msgid "Are you sure you want to delete # %s?" +msgstr "Вы действительно хотите удалить %s?" + +#: /views/details/admin_index.ctp:2 +#: /views/users/register.ctp:4 +msgid "Details" +msgstr "Данные" + +#: /views/details/admin_index.ctp:6 +#: /views/users/index.ctp:6 +msgid "Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%" +msgstr "Страница %page% из %pages%, показано %current% записей из %count%, начиная с %start%,и заканчивая %end%" + +#: /views/details/admin_index.ctp:18 +#: /views/details/admin_view.ctp:65 +#: /views/details/view.ctp:65 +#: /views/users/admin_index.ctp:21 +#: /views/users/groups.ctp:15;50 +#: /views/users/index.ctp:13 +msgid "Actions" +msgstr "Действия" + +#: /views/details/admin_index.ctp:51 +#: /views/details/admin_view.ctp:84 +#: /views/details/view.ctp:84 +#: /views/users/admin_index.ctp:45 +#: /views/users/index.ctp:31 +msgid "View" +msgstr "Просмотр" + +#: /views/details/admin_index.ctp:52 +#: /views/details/admin_view.ctp:85 +#: /views/details/view.ctp:85 +#: /views/users/admin_index.ctp:46 +#: /views/users/groups.ctp:33 +#: /views/users/index.ctp:32 +msgid "Edit" +msgstr "Редактировать" + +#: /views/details/admin_index.ctp:60 +#: /views/users/index.ctp:40 +msgid "previous" +msgstr "назад" + +#: /views/details/admin_index.ctp:62 +#: /views/users/index.ctp:42 +msgid "next" +msgstr "вперед" + +#: /views/details/admin_index.ctp:66 +#: /views/details/admin_view.ctp:46 +#: /views/details/view.ctp:46 +msgid "New Detail" +msgstr "Новые данные" + +#: /views/details/admin_view.ctp:2 +#: /views/details/view.ctp:2 +msgid "Detail" +msgstr "Данные" + +#: /views/details/admin_view.ctp:4;58 +#: /views/details/view.ctp:4;58 +msgid "Id" +msgstr "Id" + +#: /views/details/admin_view.ctp:9 +#: /views/details/view.ctp:9 +#: /views/users/admin_view.ctp:2 +#: /views/users/view.ctp:2 +msgid "User" +msgstr "Пользователь" + +#: /views/details/admin_view.ctp:14 +#: /views/details/view.ctp:14 +msgid "Position" +msgstr "Позиция" + +#: /views/details/admin_view.ctp:19 +#: /views/details/view.ctp:19 +msgid "Field" +msgstr "Поле" + +#: /views/details/admin_view.ctp:24 +#: /views/details/view.ctp:24 +msgid "Value" +msgstr "Значение" + +#: /views/details/admin_view.ctp:29;63 +#: /views/details/view.ctp:29;63 +#: /views/users/admin_view.ctp:9 +#: /views/users/view.ctp:9 +msgid "Created" +msgstr "Дата создания" + +#: /views/details/admin_view.ctp:34;64 +#: /views/details/view.ctp:34;64 +#: /views/users/admin_view.ctp:14 +msgid "Modified" +msgstr "Дата изменения" + +#: /views/details/admin_view.ctp:44 +#: /views/details/view.ctp:44 +msgid "Delete Detail" +msgstr "Удалить данные" + +#: /views/details/admin_view.ctp:54 +#: /views/details/view.ctp:54 +msgid "Related Groups" +msgstr "Связанные группы" + +#: /views/details/admin_view.ctp:59 +#: /views/details/view.ctp:59 +msgid "User Id" +msgstr "Идентификатор пользователя" + +#: /views/details/admin_view.ctp:60 +#: /views/details/view.ctp:60 +msgid "Is Public" +msgstr "Публичное?" + +#: /views/details/admin_view.ctp:61 +#: /views/details/view.ctp:61 +#: /views/users/groups.ctp:13;47 +#: /views/users/search.ctp:9 +msgid "Name" +msgstr "Название" + +#: /views/details/admin_view.ctp:62 +#: /views/details/view.ctp:62 +#: /views/users/groups.ctp:48 +msgid "Description" +msgstr "Описание" + +#: /views/details/index.ctp:17 +#: /views/users/change_password.ctp:16 +#: /views/users/login.ctp:13 +#: /views/users/register.ctp:33;89 +#: /views/users/request_password_change.ctp:12 +#: /views/users/reset_password.ctp:14 +msgid "Submit" +msgstr "Сохранить" + +#: /views/elements/login.ctp:11 +#: /views/users/admin_index.ctp:10 +#: /views/users/login.ctp:8 +#: /views/users/register.ctp:71;78 +#: /views/users/search.ctp:7 +msgid "Email" +msgstr "Email" + +#: /views/elements/login.ctp:13 +#: /views/users/login.ctp:10 +#: /views/users/register.ctp:19 +msgid "Password" +msgstr "Пароль" + +#: /views/elements/login.ctp:15 +#: /views/users/login.ctp:1;3 +msgid "Login" +msgstr "Войти" + +#: /views/elements/email/text/account_verification.ctp:2 +msgid "Hello %s," +msgstr "Здравствуйте %s," + +#: /views/elements/email/text/account_verification.ctp:4 +msgid "to validate your account, you must visit the URL below within 24 hours" +msgstr "чтобы подтвердить вашу учетную запись, необходимо посетить слеждующую ссылку в течении 24 часов." + +#: /views/elements/email/text/password_reset_request.ctp:2 +msgid "A request to reset your password was sent. To change your password click the link below." +msgstr "Запрос на сброс пароля отправлен. Чтобы сменить пароль воспользуйтесь следующей ссылкой:" + +#: /views/users/add.ctp:4 +#: /views/users/admin_add.ctp:4 +msgid "Add User" +msgstr "Добавить пользователя" + +#: /views/users/admin_edit.ctp:4 +#: /views/users/admin_view.ctp:23 +#: /views/users/edit.ctp:3 +msgid "Edit User" +msgstr "Редактировать пользователя" + +#: /views/users/admin_index.ctp:2 +#: /views/users/index.ctp:2 +msgid "Users" +msgstr "Пользователи" + +#: /views/users/admin_index.ctp:4 +msgid "Filter" +msgstr "Фильтр" + +#: /views/users/admin_index.ctp:8 +#: /views/users/admin_view.ctp:4 +#: /views/users/register.ctp:57;63 +#: /views/users/search.ctp:5 +#: /views/users/view.ctp:4 +msgid "Username" +msgstr "Имя пользователя" + +#: /views/users/admin_index.ctp:11 +#: /views/users/search.ctp:10 +msgid "Search" +msgstr "Поиск" + +#: /views/users/admin_view.ctp:24 +msgid "Delete User" +msgstr "Удалить пользователя" + +#: /views/users/change_password.ctp:1 +msgid "Change your password" +msgstr "Сменить ваш пароль" + +#: /views/users/change_password.ctp:3 +msgid "Please enter your old password because of security reasons and then your new password twice." +msgstr "По правилам безопасности необходимо указать ваш старый пароль, а затем дважды новый пароль." + +#: /views/users/change_password.ctp:8 +msgid "Old Password" +msgstr "Старый пароль" + +#: /views/users/change_password.ctp:11 +#: /views/users/reset_password.ctp:9 +msgid "New Password" +msgstr "Новый пароль" + +#: /views/users/change_password.ctp:14 +#: /views/users/reset_password.ctp:12 +msgid "Confirm" +msgstr "Подтвердить" + +#: /views/users/dashboard.ctp:2 +msgid "Welcome" +msgstr "Добро пожаловать" + +#: /views/users/dashboard.ctp:3 +msgid "Recent broadcasts" +msgstr "Свежие рассылки" + +#: /views/users/groups.ctp:2 +msgid "My Groups" +msgstr "Мои группы" + +#: /views/users/groups.ctp:5 +msgid "Create a new group" +msgstr "Создать новую группу" + +#: /views/users/groups.ctp:6 +msgid "Invite a user" +msgstr "Пригласить пользователя" + +#: /views/users/groups.ctp:7 +msgid "Requests to join" +msgstr "Запрос на присоединение" + +#: /views/users/groups.ctp:10 +msgid "My own groups" +msgstr "Мои группы" + +#: /views/users/groups.ctp:14;49 +msgid "Members" +msgstr "Участники" + +#: /views/users/groups.ctp:34 +msgid "Invite user" +msgstr "Пригласить пользователя" + +#: /views/users/groups.ctp:35 +msgid "Manage Broadcast Scope" +msgstr "Управление массовыми рассылками" + +#: /views/users/groups.ctp:36 +msgid "Access" +msgstr "Доступ" + +#: /views/users/groups.ctp:37 +msgid "Addons" +msgstr "Плагины" + +#: /views/users/groups.ctp:44 +msgid "Groups im a member in" +msgstr "Группы, в которых я состою" + +#: /views/users/groups.ctp:68 +msgid "Leave group" +msgstr "Покинуть группу" + +#: /views/users/login.ctp:11 +msgid "Remember Me" +msgstr "Запомнить меня" + +#: /views/users/register.ctp:2 +msgid "Account registration" +msgstr "Регистрация учетной записи" + +#: /views/users/register.ctp:10 +msgid "Please select a username that is not already in use" +msgstr "Выберете не используемое имя пользователя" + +#: /views/users/register.ctp:11 +msgid "Must be at least 3 characters" +msgstr "Как минимум 3 символа" + +#: /views/users/register.ctp:12 +msgid "Username must contain numbers and letters only" +msgstr "Имя пользователя должно содержать только буквы и цифры" + +#: /views/users/register.ctp:13 +msgid "Please choose username" +msgstr "Выберете имя пользователя" + +#: /views/users/register.ctp:15 +msgid "E-mail (used as login)" +msgstr "Email (используется для входа)" + +#: /views/users/register.ctp:16 +msgid "Must be a valid email address" +msgstr "Укажите верный адрес email" + +#: /views/users/register.ctp:17 +msgid "An account with that email already exists" +msgstr "Учетная запись с данным email уже существует" + +#: /views/users/register.ctp:21 +msgid "Must be at least 5 characters long" +msgstr "Должно быть как минимум 5 символов" + +#: /views/users/register.ctp:23 +msgid "Password (confirm)" +msgstr "Пароль (подтверждение)" + +#: /views/users/register.ctp:25 +msgid "Passwords must match" +msgstr "Пароли должны совпадать" + +#: /views/users/register.ctp:29;85 +msgid "I have read and agreed to " +msgstr "Я прочитал и согласен с" + +#: /views/users/register.ctp:29;85 +msgid "Terms of Service" +msgstr "правилами пользования сервисом" + +#: /views/users/register.ctp:30;86 +msgid "You must verify you have read the Terms of Service" +msgstr "Необходимо подтвердить, что вы прочитали правила пользования сервисом." + +#: /views/users/register.ctp:46 +msgid "Openid Identifier" +msgstr "Идентификация Openid" + +#: /views/users/request_password_change.ctp:1 +msgid "Forgot your password?" +msgstr "Забыли пароль?" + +#: /views/users/request_password_change.ctp:3 +msgid "Please enter the email you used for registration and you'll get an email with further instructions." +msgstr "Укажите email который использовался при регистрации и вы получите дальнейшие инструкции." + +#: /views/users/request_password_change.ctp:11 +msgid "Your Email" +msgstr "Ваш почтовый адрес" + +#: /views/users/reset_password.ctp:1 +msgid "Reset your password" +msgstr "Сбросить ваш пароль" + +#: /views/users/search.ctp:1 +msgid "Search for users" +msgstr "Поиск пользователей" + diff --git a/locale/spa/LC_MESSAGES/users.po b/locale/spa/LC_MESSAGES/users.po new file mode 100755 index 000000000..e947da423 --- /dev/null +++ b/locale/spa/LC_MESSAGES/users.po @@ -0,0 +1,721 @@ +# LANGUAGE translation of the CakePHP Users plugin +# +# Copyright 2010, Cake Development Corporation (http://cakedc.com) +# +# Licensed under The MIT License +# Redistributions of files must retain the above copyright notice. +# +# @copyright Copyright 2010, Cake Development Corporation (http://cakedc.com) +# @license MIT License (http://www.opensource.org/licenses/mit-license.php) +# +msgid "" +msgstr "" +"Project-Id-Version: Users CakePHP plugin\n" +"POT-Creation-Date: 2010-09-15 15:48+0200\n" +"PO-Revision-Date: 2010-09-24 16:38-0400\n" +"Last-Translator: José Lorenzo Rodríguez \n" +"Language-Team: CakeDC \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: /controllers/details_controller.php:57;138 +msgid "Invalid Detail." +msgstr "Detalle no váido" + +#: /controllers/details_controller.php:78 +msgid "Saved" +msgstr "Guardado" + +#: /controllers/details_controller.php:96 +msgid "%s details saved" +msgstr "%s detalles guardados" + +#: /controllers/details_controller.php:113;196 +msgid "Invalid id for Detail" +msgstr "Identificador no válido para detalle" + +#: /controllers/details_controller.php:117;200 +msgid "Detail deleted" +msgstr "Detalle eliminado" + +#: /controllers/details_controller.php:152;175 +msgid "The Detail has been saved" +msgstr "El detalle ha sido guardado" + +#: /controllers/details_controller.php:155;178 +msgid "The Detail could not be saved. Please, try again." +msgstr "El detalle no pudo ser guardado, intente de nuevo" + +#: /controllers/details_controller.php:170 +msgid "Invalid Detail" +msgstr "Detalle no válido" + +#: /controllers/users_controller.php:157 +msgid "Profile saved." +msgstr "Perfil guardado" + +#: /controllers/users_controller.php:159 +msgid "Could not save your profile." +msgstr "No se pudo guardar su perfil" + +#: /controllers/users_controller.php:193 +msgid "Invalid User." +msgstr "Usuario no válido" + +#: /controllers/users_controller.php:207 +msgid "The User has been saved" +msgstr "El usuario ha sido guardado" + +#: /controllers/users_controller.php:223 +msgid "User saved" +msgstr "Usuario guardado" + +#: /controllers/users_controller.php:247 +msgid "User deleted" +msgstr "Usuario elimianado" + +#: /controllers/users_controller.php:249 +#: /models/user.php:703 +msgid "Invalid User" +msgstr "Usuario no válido" + +#: /controllers/users_controller.php:273 +msgid "You are already registered and logged in!" +msgstr "¡Ya estás registrado e iniciado la sesión!" + +#: /controllers/users_controller.php:282 +#: /tests/cases/controllers/users_controller.test.php:194 +msgid "Your account has been created. You should receive an e-mail shortly to authenticate your account. Once validated you will be able to login." +msgstr "Su cuenta ha sido creada. Debería recibir un correo para autenticar su cuenta. Una vez validada podrá iniciar sesión" + +#: /controllers/users_controller.php:287 +#: /tests/cases/controllers/users_controller.test.php:205 +msgid "Your account could not be created. Please, try again." +msgstr "Su suenta no pudo ser creada, intente de nuevo" + +#: /controllers/users_controller.php:309 +msgid "%s you have successfully logged in" +msgstr "%s usted ha iniciado sesión" + +#: /controllers/users_controller.php:383 +msgid "%s you have successfully logged out" +msgstr "%s usted ha cerrado la sesión" + +#: /controllers/users_controller.php:409 +msgid "There url you accessed is not longer valid" +msgstr "El url que intentó acceder ya no es válido" + +#: /controllers/users_controller.php:432;545 +msgid "Password Reset" +msgstr "Contraseña reiniciada" + +#: /controllers/users_controller.php:434 +msgid "Your password has been reset" +msgstr "Su contraseña ha sido reiniciada" + +#: /controllers/users_controller.php:435 +msgid "Please login using this password and change your password" +msgstr "Por favor ingrese usando esta contraseña y luego cámbiela" + +#: /controllers/users_controller.php:438 +msgid "Your password was sent to your registered email account" +msgstr "Su contraseña fue enviada a su cuenta de correo registrada" + +#: /controllers/users_controller.php:444 +#: /tests/cases/controllers/users_controller.test.php:219 +msgid "Your e-mail has been validated!" +msgstr "¡Su correo ha sido validado!" + +#: /controllers/users_controller.php:448 +msgid "There was an error trying to validate your e-mail address. Please check your e-mail for the URL you should use to verify your e-mail address." +msgstr "Ocurrió un error tratando de validar su dirección de correo. Por favor verifique su correo en busca del URL que debe usar para verificar su cuenta." + +#: /controllers/users_controller.php:452 +#: /tests/cases/controllers/users_controller.test.php:224 +msgid "The url you accessed is not longer valid" +msgstr "El URL que accedió no es válido" + +#: /controllers/users_controller.php:467 +msgid "Password changed." +msgstr "Contraseña modificada" + +#: /controllers/users_controller.php:521 +msgid "Account verification" +msgstr "Verificación de cuenta" + +#: /controllers/users_controller.php:563 +msgid "%s has been sent an email with instruction to reset their password." +msgstr "%s ha sido enviado un correo con instrucciones para reiniciar su contraseña" + +#: /controllers/users_controller.php:567 +msgid "You should receive an email with further instructions shortly" +msgstr "Debe resibir un correo con más instrucciones en breve" + +#: /controllers/users_controller.php:571 +msgid "No user was found with that email." +msgstr "Ningún usuario fue encontrado con dicho correo" + +#: /controllers/users_controller.php:588 +msgid "Invalid password reset token, try again." +msgstr "Contraseña no válida" + +#: /controllers/users_controller.php:594 +msgid "Password changed, you can now login with your new password." +msgstr "Contraseña modificada, ahora puede ingresar nuevamente" + +#: /models/user.php:102 +msgid "Please enter a username" +msgstr "Por favor ingrese un nombre de usuario" + +#: /models/user.php:105 +msgid "The username must be alphanumeric" +msgstr "El nombre de usuario debe ser alfa-numérico" + +#: /models/user.php:108 +msgid "This username is already in use." +msgstr "Este nombre de usuario ya se encuentra en uso" + +#: /models/user.php:111 +msgid "The username must have at least 3 characters." +msgstr "El nombre de usuario debe contener al menos 3 caracteres" + +#: /models/user.php:116 +msgid "Please enter a valid email address." +msgstr "Por favor ingrese una dirección de correo electrónico válida" + +#: /models/user.php:119 +msgid "This email is already in use." +msgstr "Este correo ya se encuentra en uso" + +#: /models/user.php:123 +msgid "The password must have at least 8 characters." +msgstr "La contraseña debe tener al menos 8 caracteres" + +#: /models/user.php:126 +msgid "Please enter a password." +msgstr "Por favor ingrese una contraseña" + +#: /models/user.php:129 +msgid "The passwords are not equal, please try again." +msgstr "Las contraseñas no coinciden, por favor intente de nuevo" + +#: /models/user.php:132 +msgid "You must agree to the terms of use." +msgstr "Debe estar de acuerdo con los términos de uso" + +#: /models/user.php:137;357 +msgid "The passwords are not equal." +msgstr "Las contraseñas no coinciden" + +#: /models/user.php:139 +msgid "Invalid password." +msgstr "Contraseña no válida" + +#: /models/user.php:150 +msgid "Invalid date" +msgstr "Fecha no válida" + +#: /models/user.php:315 +msgid "This Email Address exists but was never validated." +msgstr "La dirección de correo existe, pero nunca fue validada" + +#: /models/user.php:317 +msgid "This Email Address does not exist in the system." +msgstr "Esta dirección de correo no existe en el sistema" + +# Error? +#: /models/user.php:406 +msgid "$this->data['" +msgstr "" + +#: /models/user.php:460 +msgid "The user does not exist." +msgstr "El usuario no existe" + +#: /models/user.php:505 +msgid "Please enter your email address." +msgstr "Por favor ingresa tu dirección de correo" + +#: /models/user.php:515 +msgid "The email address does not exist in the system" +msgstr "La dirección de correo no existe en el sistema" + +#: /models/user.php:520 +msgid "Your account is already authenticaed." +msgstr "Yu cuenta ya ha sido autenticada" + +#: /models/user.php:525 +msgid "Your account is disabled." +msgstr "Tu cuenta está deshabilidata" + +#: /tests/cases/controllers/users_controller.test.php:34 +msgid "Sorry, but you need to login to access this location." +msgstr "Lo sentimos, pero debe iniciar sesión para acceder a esta ubicación" + +#: /tests/cases/controllers/users_controller.test.php:35;174 +msgid "Invalid e-mail / password combination. Please try again" +msgstr "Combinación de correo / contraseña no válida. Intente de nuevo" + +#: /tests/cases/controllers/users_controller.test.php:168 +msgid "testuser you have successfully logged in" +msgstr "testuser has ingresado exitosamente" + +#: /tests/cases/controllers/users_controller.test.php:237 +msgid "floriank you have successfully logged out" +msgstr "floriank you have successfully logged out" + +#: /views/details/add.ctp:4 +#: /views/details/admin_add.ctp:4 +msgid "Add Detail" +msgstr "Agregar detalle" + +#: /views/details/add.ctp:17 +#: /views/details/admin_add.ctp:17 +#: /views/details/admin_edit.ctp:19 +#: /views/details/admin_view.ctp:45 +#: /views/details/view.ctp:45 +msgid "List Details" +msgstr "Listar detalles" + +#: /views/details/add.ctp:18 +#: /views/details/admin_add.ctp:18 +#: /views/details/admin_edit.ctp:20 +#: /views/details/admin_index.ctp:67 +#: /views/details/admin_view.ctp:47 +#: /views/details/view.ctp:47 +#: /views/users/add.ctp:15 +#: /views/users/admin_add.ctp:13 +#: /views/users/admin_edit.ctp:15 +#: /views/users/admin_view.ctp:25 +msgid "List Users" +msgstr "Listar usuarios" + +#: /views/details/add.ctp:19 +#: /views/details/admin_add.ctp:19 +#: /views/details/admin_edit.ctp:21 +#: /views/details/admin_index.ctp:68 +#: /views/details/admin_view.ctp:48 +#: /views/details/view.ctp:48 +#: /views/users/admin_view.ctp:26 +#: /views/users/index.ctp:46 +msgid "New User" +msgstr "Nuevo usuario" + +#: /views/details/add.ctp:20 +#: /views/details/admin_add.ctp:20 +#: /views/details/admin_edit.ctp:22 +#: /views/details/admin_index.ctp:69 +#: /views/details/admin_view.ctp:49 +#: /views/details/view.ctp:49 +msgid "List Groups" +msgstr "Listar grupos" + +#: /views/details/add.ctp:21 +#: /views/details/admin_add.ctp:21 +#: /views/details/admin_edit.ctp:23 +#: /views/details/admin_index.ctp:70 +#: /views/details/admin_view.ctp:50;95 +#: /views/details/view.ctp:50;95 +msgid "New Group" +msgstr "Nuevo grupo" + +#: /views/details/admin_edit.ctp:4 +#: /views/details/admin_view.ctp:43 +#: /views/details/edit.ctp:5 +#: /views/details/view.ctp:43 +msgid "Edit Detail" +msgstr "Editar detalle" + +#: /views/details/admin_edit.ctp:18 +#: /views/details/admin_index.ctp:53 +#: /views/details/admin_view.ctp:86 +#: /views/details/view.ctp:86 +#: /views/users/admin_edit.ctp:14 +#: /views/users/admin_index.ctp:47 +#: /views/users/groups.ctp:38 +#: /views/users/index.ctp:33 +msgid "Delete" +msgstr "Eliminar" + +#: /views/details/admin_edit.ctp:18 +#: /views/details/admin_index.ctp:53 +#: /views/details/admin_view.ctp:44;86 +#: /views/details/view.ctp:44;86 +#: /views/users/admin_edit.ctp:14 +#: /views/users/admin_index.ctp:47 +#: /views/users/admin_view.ctp:24 +#: /views/users/index.ctp:33 +msgid "Are you sure you want to delete # %s?" +msgstr "¿Está seguro que desea eliminar %s?" + +#: /views/details/admin_index.ctp:2 +#: /views/users/register.ctp:4 +msgid "Details" +msgstr "Detalles" + +#: /views/details/admin_index.ctp:6 +#: /views/users/index.ctp:6 +msgid "Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%" +msgstr "Página %page% de %pages%, mostrando %current% registros de %count% en total, empezando en %start% y terminando en %end%" + +#: /views/details/admin_index.ctp:18 +#: /views/details/admin_view.ctp:65 +#: /views/details/view.ctp:65 +#: /views/users/admin_index.ctp:21 +#: /views/users/groups.ctp:15;50 +#: /views/users/index.ctp:13 +msgid "Actions" +msgstr "Acciones" + +#: /views/details/admin_index.ctp:51 +#: /views/details/admin_view.ctp:84 +#: /views/details/view.ctp:84 +#: /views/users/admin_index.ctp:45 +#: /views/users/index.ctp:31 +msgid "View" +msgstr "Ver" + +#: /views/details/admin_index.ctp:52 +#: /views/details/admin_view.ctp:85 +#: /views/details/view.ctp:85 +#: /views/users/admin_index.ctp:46 +#: /views/users/groups.ctp:33 +#: /views/users/index.ctp:32 +msgid "Edit" +msgstr "Editar" + +#: /views/details/admin_index.ctp:60 +#: /views/users/index.ctp:40 +msgid "previous" +msgstr "anterior" + +#: /views/details/admin_index.ctp:62 +#: /views/users/index.ctp:42 +msgid "next" +msgstr "siguiente" + +#: /views/details/admin_index.ctp:66 +#: /views/details/admin_view.ctp:46 +#: /views/details/view.ctp:46 +msgid "New Detail" +msgstr "Nuevo detalle" + +#: /views/details/admin_view.ctp:2 +#: /views/details/view.ctp:2 +msgid "Detail" +msgstr "Detalle" + +#: /views/details/admin_view.ctp:4;58 +#: /views/details/view.ctp:4;58 +msgid "Id" +msgstr "Id" + +#: /views/details/admin_view.ctp:9 +#: /views/details/view.ctp:9 +#: /views/users/admin_view.ctp:2 +#: /views/users/view.ctp:2 +msgid "User" +msgstr "Usuario" + +#: /views/details/admin_view.ctp:14 +#: /views/details/view.ctp:14 +msgid "Position" +msgstr "Posición" + +#: /views/details/admin_view.ctp:19 +#: /views/details/view.ctp:19 +msgid "Field" +msgstr "Campo" + +#: /views/details/admin_view.ctp:24 +#: /views/details/view.ctp:24 +msgid "Value" +msgstr "Valor" + +#: /views/details/admin_view.ctp:29;63 +#: /views/details/view.ctp:29;63 +#: /views/users/admin_view.ctp:9 +#: /views/users/view.ctp:9 +msgid "Created" +msgstr "Creado" + +#: /views/details/admin_view.ctp:34;64 +#: /views/details/view.ctp:34;64 +#: /views/users/admin_view.ctp:14 +msgid "Modified" +msgstr "Modificado" + +#: /views/details/admin_view.ctp:44 +#: /views/details/view.ctp:44 +msgid "Delete Detail" +msgstr "Eliminar detalle" + +#: /views/details/admin_view.ctp:54 +#: /views/details/view.ctp:54 +msgid "Related Groups" +msgstr "Grupos relacionado" + +#: /views/details/admin_view.ctp:59 +#: /views/details/view.ctp:59 +msgid "User Id" +msgstr "Usuario Id" + +#: /views/details/admin_view.ctp:60 +#: /views/details/view.ctp:60 +msgid "Is Public" +msgstr "Es Público" + +#: /views/details/admin_view.ctp:61 +#: /views/details/view.ctp:61 +#: /views/users/groups.ctp:13;47 +#: /views/users/search.ctp:9 +msgid "Name" +msgstr "Nombre" + +#: /views/details/admin_view.ctp:62 +#: /views/details/view.ctp:62 +#: /views/users/groups.ctp:48 +msgid "Description" +msgstr "Descripción" + +#: /views/details/index.ctp:17 +#: /views/users/change_password.ctp:16 +#: /views/users/login.ctp:13 +#: /views/users/register.ctp:33;89 +#: /views/users/request_password_change.ctp:12 +#: /views/users/reset_password.ctp:14 +msgid "Submit" +msgstr "Enviar" + +#: /views/elements/login.ctp:11 +#: /views/users/admin_index.ctp:10 +#: /views/users/login.ctp:8 +#: /views/users/register.ctp:71;78 +#: /views/users/search.ctp:7 +msgid "Email" +msgstr "Correo" + +#: /views/elements/login.ctp:13 +#: /views/users/login.ctp:10 +#: /views/users/register.ctp:19 +msgid "Password" +msgstr "Contraseña" + +#: /views/elements/login.ctp:15 +#: /views/users/login.ctp:1;3 +msgid "Login" +msgstr "Nombre de Usuario" + +#: /views/elements/email/text/account_verification.ctp:2 +msgid "Hello %s," +msgstr "Hola %s," + +#: /views/elements/email/text/account_verification.ctp:4 +msgid "to validate your account, you must visit the URL below within 24 hours" +msgstr "Para validar su cuenta, debe vistar el URL antes de 24 horas" + +#: /views/elements/email/text/password_reset_request.ctp:2 +msgid "A request to reset your password was sent. To change your password click the link below." +msgstr "Una solicitud para reiniciar la contraseña fue enviada. Para cambiarla haga click en el siguiente enlace" + +#: /views/users/add.ctp:4 +#: /views/users/admin_add.ctp:4 +msgid "Add User" +msgstr "Agregar usuario" + +#: /views/users/admin_edit.ctp:4 +#: /views/users/admin_view.ctp:23 +#: /views/users/edit.ctp:3 +msgid "Edit User" +msgstr "Editar Usuario" + +#: /views/users/admin_index.ctp:2 +#: /views/users/index.ctp:2 +msgid "Users" +msgstr "Usuarios" + +#: /views/users/admin_index.ctp:4 +msgid "Filter" +msgstr "Filtrar" + +#: /views/users/admin_index.ctp:8 +#: /views/users/admin_view.ctp:4 +#: /views/users/register.ctp:57;63 +#: /views/users/search.ctp:5 +#: /views/users/view.ctp:4 +msgid "Username" +msgstr "Nombre de Usuario" + +#: /views/users/admin_index.ctp:11 +#: /views/users/search.ctp:10 +msgid "Search" +msgstr "Buscar" + +#: /views/users/admin_view.ctp:24 +msgid "Delete User" +msgstr "Eliminar Usuario" + +#: /views/users/change_password.ctp:1 +msgid "Change your password" +msgstr "Cambiar contraseña" + +#: /views/users/change_password.ctp:3 +msgid "Please enter your old password because of security reasons and then your new password twice." +msgstr "Por favor ingrese su antigua contraseña por razones de seguridad y luego ingrese su nueva contraseña dos veces" + +#: /views/users/change_password.ctp:8 +msgid "Old Password" +msgstr "Contraseña anterior" + +#: /views/users/change_password.ctp:11 +#: /views/users/reset_password.ctp:9 +msgid "New Password" +msgstr "Nueva Contraseña" + +#: /views/users/change_password.ctp:14 +#: /views/users/reset_password.ctp:12 +msgid "Confirm" +msgstr "Confirmar" + +#: /views/users/dashboard.ctp:2 +msgid "Welcome" +msgstr "Bienvenido" + +#: /views/users/dashboard.ctp:3 +msgid "Recent broadcasts" +msgstr "Mensajes recientes" + +#: /views/users/groups.ctp:2 +msgid "My Groups" +msgstr "Mis grupos" + +#: /views/users/groups.ctp:5 +msgid "Create a new group" +msgstr "Crear un nuevo grupo" + +#: /views/users/groups.ctp:6 +msgid "Invite a user" +msgstr "Invitar un usuario" + +#: /views/users/groups.ctp:7 +msgid "Requests to join" +msgstr "Solicitar ingreso" + +#: /views/users/groups.ctp:10 +msgid "My own groups" +msgstr "Mis grupos" + +#: /views/users/groups.ctp:14;49 +msgid "Members" +msgstr "Miembros" + +#: /views/users/groups.ctp:34 +msgid "Invite user" +msgstr "Invitar usuario" + +#: /views/users/groups.ctp:35 +msgid "Manage Broadcast Scope" +msgstr "Gestionar alcance de mensajes" + +#: /views/users/groups.ctp:36 +msgid "Access" +msgstr "Acceso" + +#: /views/users/groups.ctp:37 +msgid "Addons" +msgstr "Complementos" + +#: /views/users/groups.ctp:44 +msgid "Groups im a member in" +msgstr "Grupos en los que el miembro está" + +#: /views/users/groups.ctp:68 +msgid "Leave group" +msgstr "Dejar grupo" + +#: /views/users/login.ctp:11 +msgid "Remember Me" +msgstr "Recordarme" + +#: /views/users/register.ctp:2 +msgid "Account registration" +msgstr "Registro de cuenta" + +#: /views/users/register.ctp:10 +msgid "Please select a username that is not already in use" +msgstr "Por favor seleccione un nombre de usuario que no esté en uso" + +#: /views/users/register.ctp:11 +msgid "Must be at least 3 characters" +msgstr "Debe ser de al menos 3 caracteres" + +#: /views/users/register.ctp:12 +msgid "Username must contain numbers and letters only" +msgstr "El nombre de usuario debe contener solo letras y números" + +#: /views/users/register.ctp:13 +msgid "Please choose username" +msgstr "Por favor escoja un nombre de usuario" + +#: /views/users/register.ctp:15 +msgid "E-mail (used as login)" +msgstr "Correo (usuado para ingresar)" + +#: /views/users/register.ctp:16 +msgid "Must be a valid email address" +msgstr "Debe ser una cuenta de correo válida" + +#: /views/users/register.ctp:17 +msgid "An account with that email already exists" +msgstr "Una cuenta con dicho correo ya existe" + +#: /views/users/register.ctp:21 +msgid "Must be at least 5 characters long" +msgstr "Debe ser de al menos 5 caracteres" + +#: /views/users/register.ctp:23 +msgid "Password (confirm)" +msgstr "Contraseña (confirmación)" + +#: /views/users/register.ctp:25 +msgid "Passwords must match" +msgstr "Las contraseñas deben coincidir" + +#: /views/users/register.ctp:29;85 +msgid "I have read and agreed to " +msgstr "He leido y estoy de acuerdo con" + +#: /views/users/register.ctp:29;85 +msgid "Terms of Service" +msgstr "Términos del Servicio" + +#: /views/users/register.ctp:30;86 +msgid "You must verify you have read the Terms of Service" +msgstr "Debe verificar que ha leído los Términos de Servicio" + +#: /views/users/register.ctp:46 +msgid "Openid Identifier" +msgstr "Identificador Openid" + +#: /views/users/request_password_change.ctp:1 +msgid "Forgot your password?" +msgstr "¿Olvidó su contraseña?" + +#: /views/users/request_password_change.ctp:3 +msgid "Please enter the email you used for registration and you'll get an email with further instructions." +msgstr "Por favor ingrese el correo que utilizó para registrarse y recibirá un correo con más instrucciones" + +#: /views/users/request_password_change.ctp:11 +msgid "Your Email" +msgstr "Su correo" + +#: /views/users/reset_password.ctp:1 +msgid "Reset your password" +msgstr "Reiniciar contraseña" + +#: /views/users/search.ctp:1 +msgid "Search for users" +msgstr "Buscar usuarios" + diff --git a/locale/users.pot b/locale/users.pot old mode 100644 new mode 100755 diff --git a/models/detail.php b/models/detail.php old mode 100644 new mode 100755 index ec269006d..d0a3273cf --- a/models/detail.php +++ b/models/detail.php @@ -217,6 +217,9 @@ public function saveSection($userId = null, $data = null, $section = null) { $newDetail[$model]['field'] = $field; $newDetail[$model]['value'] = $value; + $newDetail[$model]['input'] = ''; + $newDetail[$model]['data_type'] = ''; + $newDetail[$model]['label'] = ''; $this->save($newDetail, false); } } elseif (isset($this->{$model})) { diff --git a/models/user.php b/models/user.php old mode 100644 new mode 100755 index 49d19a89b..fd7c626a9 --- a/models/user.php +++ b/models/user.php @@ -75,6 +75,13 @@ class User extends UsersAppModel { */ public $validate = array(); +/** + * Detail model + * + * @var Detail + */ + public $Detail = null; + /** * Constructor * @@ -406,16 +413,13 @@ public function view($slug = null) { 'Detail'), 'conditions' => array( $this->alias . '.slug' => $slug, - 'OR' => array( - 'AND' => - array($this->alias . '.active' => 1, $this->alias . '.email_authenticated' => 1), - //array($this->alias . '.active' => 1, $this->alias . '.account_type' => 'remote') - )))); + $this->alias . '.active' => 1, + $this->alias . '.email_authenticated' => 1), + )); if (empty($user)) { throw new Exception(__d('users', 'The user does not exist.', true)); } - return $user; } diff --git a/readme.md b/readme.md old mode 100644 new mode 100755 index 1e8752bc7..0ae7aba9e --- a/readme.md +++ b/readme.md @@ -15,6 +15,9 @@ or cake migration all -plugin users You will also need the [CakeDC Search plugin](http://github.com/CakeDC/search), just grab it and put it into your application's plugin folder. +and the [CakeDC Utils plugin](http://github.com/CakeDC/utils) + +just grab them and put it into your application's plugin folder. ## How to use it ## diff --git a/tests/cases/controllers/components/users_auth.test.php b/tests/cases/controllers/components/users_auth.test.php new file mode 100755 index 000000000..b8a539716 --- /dev/null +++ b/tests/cases/controllers/components/users_auth.test.php @@ -0,0 +1,115 @@ +User = ClassRegistry::init('Users.User'); + $this->Users = new UsersAuthTestController(); + $this->Users->Component->init($this->Users); + $this->Users->Component->initialize($this->Users); + $this->Users->beforeFilter(); + ClassRegistry::addObject('view', new View($this->Users)); + $this->Users->Session->delete('Auth'); + $this->Users->Session->delete('Message.auth'); + + $this->Users->params = Router::parse('users_auth_test/login'); + $this->Users->params['url']['url'] = 'users_auth_test/login'; + + $this->Users->Auth->startup($this->Users); + + Router::reload(); + } + +/** + * Tear Down + * + * @return void + */ + public function tearDown() { + $this->Users->Session->delete('Auth'); + $this->Users->Session->delete('Message.auth'); + ClassRegistry::flush(); + } + +/** + * Test setting the cookie + * + * @return void + */ + public function testSetCookie() { + $this->Users->data = array( + 'User' => array( + 'remember_me' => 1, + 'username' => 'test', + 'password' => 'testtest' + ) + ); + $this->Users->Auth->login(); +// $this->Users->Cookie->name = 'userTestCookie'; + $result = $this->Users->Cookie->read('User'); + $this->assertEqual($result, array( + 'username' => 'test', + 'password' => 'testtest')); + } +} diff --git a/tests/cases/controllers/details_controller.test.php b/tests/cases/controllers/details_controller.test.php old mode 100644 new mode 100755 diff --git a/tests/cases/controllers/users_controller.test.php b/tests/cases/controllers/users_controller.test.php old mode 100644 new mode 100755 index a6fe795f2..9b6722b5e --- a/tests/cases/controllers/users_controller.test.php +++ b/tests/cases/controllers/users_controller.test.php @@ -33,28 +33,6 @@ class TestUsersController extends UsersController { */ public $uses = array('Users.User'); -/** - * beforeFilter Callback - * - * @return void - */ - public function beforeFilter() { - parent::beforeFilter(); - $this->Auth->authorize = 'controller'; - $this->Auth->fields = array('username' => 'email', 'password' => 'passwd'); - $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login', 'prefix' => 'admin', 'admin' => false, 'plugin' => 'users'); - $this->Auth->loginRedirect = $this->Session->read('Auth.redirect'); - $this->Auth->logoutRedirect = '/'; - $this->Auth->authError = __d('users', 'Sorry, but you need to login to access this location.', true); - $this->Auth->loginError = __d('users', 'Invalid e-mail / password combination. Please try again', true); - $this->Auth->autoRedirect = true; - $this->Auth->userModel = 'User'; - $this->Auth->userScope = array( - 'OR' => array( - 'AND' => - array('User.active' => 1, 'User.email_authenticated' => 1))); - } - /** * Public interface to _setCookie */ @@ -179,21 +157,21 @@ public function testUserLogin() { $this->Users->Component->startup($this->Users); $this->Users->login(); - $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'testuser you have successfully logged in', true)); + $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'testuser, you have successfully logged in.', true)); $this->assertEqual(Router::normalize($this->Users->redirectUrl), Router::normalize(Router::url($this->Users->Auth->loginRedirect))); $this->__setPost(array('User' => $this->usersData['invalidUser'])); $this->Users->beforeFilter(); $this->Users->login(); - $this->assertEqual($this->Users->Session->read('Message.auth.message'), __d('users', 'Invalid e-mail / password combination. Please try again', true)); + $this->assertEqual($this->Users->Session->read('Message.auth.message'), __d('users', 'Invalid e-mail / password combination. Please try again', true)); } /** * Test user registration * */ - public function testRegister() { - $this->Users->params['action'] = 'register'; + public function testAdd() { + $this->Users->params['action'] = 'add'; $this->__setPost(array( 'User' => array( @@ -203,7 +181,7 @@ public function testRegister() { 'temppassword' => 'password', 'tos' => 1))); $this->Users->beforeFilter(); - $this->Users->register(); + $this->Users->add(); $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'Your account has been created. You should receive an e-mail shortly to authenticate your account. Once validated you will be able to login.', true)); $this->__setPost(array( @@ -214,7 +192,7 @@ public function testRegister() { 'temppassword' => '', 'tos' => 0))); $this->Users->beforeFilter(); - $this->Users->register(); + $this->Users->add(); $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'Your account could not be created. Please, try again.', true)); } @@ -224,16 +202,14 @@ public function testRegister() { */ public function testVerify() { $this->Users->beforeFilter(); - $this->Users->passedArgs[1] = 'testtoken2'; $this->Users->User->id = '37ea303a-3bdc-4251-b315-1316c0b300fa'; $this->Users->User->saveField('email_token_expires', date('Y-m-d H:i:s', strtotime('+1 year'))); - $this->Users->verify($type = 'email'); - $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'Your e-mail has been validated!', true)); + $this->Users->verify('email', 'testtoken2'); + $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'Your e-mail has been validated. You may now login.', true)); $this->Users->beforeFilter(); - $this->Users->passedArgs[1] = 'invalid-token'; - $this->Users->verify($type = 'email'); - $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'The url you accessed is not longer valid', true)); + $this->Users->verify('email', 'invalid-token'); + $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'The url you have accessed is no longer valid', true)); } /** @@ -245,7 +221,7 @@ public function testLogout() { $this->Users->beforeFilter(); $this->Users->Session->write('Auth.User', $this->usersData['validUser']); $this->Users->logout(); - $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'floriank you have successfully logged out', true)); + $this->assertEqual($this->Users->Session->read('Message.flash.message'), __d('users', 'floriank, you have successfully logged out.', true)); $this->assertEqual($this->Users->redirectUrl, '/'); } @@ -381,31 +357,13 @@ public function testAdminDelete() { $this->assertEqual($this->Users->redirectUrl, array('action' => 'index')); } -/** - * Test setting the cookie - * - */ - public function testSetCookie() { - $this->Users->data['User'] = array( - 'remember_me' => 1, - 'username' => 'test', - 'password' => 'testtest'); - $this->Users->setCookie(array( - 'name' => 'userTestCookie')); - $this->Users->Cookie->name = 'userTestCookie'; - $result = $this->Users->Cookie->read('User'); - $this->assertEqual($result, array( - 'username' => 'test', - 'password' => 'testtest')); - } - /** * Test * */ private function __setPost($data = array()) { $_SERVER['REQUEST_METHOD'] = 'POST'; - $this->Users->data = am($data, array('_method' => 'POST')); + $this->Users->data = array_merge($data, array('_method' => 'POST')); } /** diff --git a/tests/cases/models/detail.test.php b/tests/cases/models/detail.test.php old mode 100644 new mode 100755 diff --git a/tests/cases/models/user.test.php b/tests/cases/models/user.test.php old mode 100644 new mode 100755 diff --git a/tests/fixtures/detail_fixture.php b/tests/fixtures/detail_fixture.php old mode 100644 new mode 100755 diff --git a/tests/fixtures/user_fixture.php b/tests/fixtures/user_fixture.php old mode 100644 new mode 100755 diff --git a/users_app_controller.php b/users_app_controller.php old mode 100644 new mode 100755 index 92b5400ae..7209b0ac2 --- a/users_app_controller.php +++ b/users_app_controller.php @@ -13,7 +13,23 @@ * Users App Controller * * @package users - * @subpackage users.controllers */ class UsersAppController extends AppController { + +/** + * Determine if the user is authorized to view the requested action + * + * Inspect the URL and return true if the user is authorized + * + * @return boolean Authorized to view action + */ + public function isAuthorized() { + $authorized = true; + + // Restrict "admin" prefix routes to users with the role "admin". + if (isset($this->params['prefix']) && $this->params['prefix'] == 'admin') { + $authorized = $this->Auth->user('role') === 'admin'; + } + return $authorized; + } } diff --git a/users_app_model.php b/users_app_model.php old mode 100644 new mode 100755 diff --git a/views/details/add.ctp b/views/details/add.ctp old mode 100644 new mode 100755 diff --git a/views/details/admin_add.ctp b/views/details/admin_add.ctp old mode 100644 new mode 100755 diff --git a/views/details/admin_edit.ctp b/views/details/admin_edit.ctp old mode 100644 new mode 100755 diff --git a/views/details/admin_index.ctp b/views/details/admin_index.ctp old mode 100644 new mode 100755 diff --git a/views/details/admin_view.ctp b/views/details/admin_view.ctp old mode 100644 new mode 100755 diff --git a/views/details/edit.ctp b/views/details/edit.ctp old mode 100644 new mode 100755 diff --git a/views/details/index.ctp b/views/details/index.ctp old mode 100644 new mode 100755 diff --git a/views/details/view.ctp b/views/details/view.ctp old mode 100644 new mode 100755 diff --git a/views/elements/email/html/account_verification.ctp b/views/elements/email/html/account_verification.ctp new file mode 100755 index 000000000..d07538411 --- /dev/null +++ b/views/elements/email/html/account_verification.ctp @@ -0,0 +1,4 @@ +


+

+ +

false, 'plugin' => 'users', 'controller' => 'users', 'action' => 'verify', 'email', $user['User']['email_token']), true); ?>

diff --git a/views/elements/email/html/password_reset_request.ctp b/views/elements/email/html/password_reset_request.ctp new file mode 100755 index 000000000..86faccc12 --- /dev/null +++ b/views/elements/email/html/password_reset_request.ctp @@ -0,0 +1,3 @@ +

+ +

false, 'plugin' => 'users', 'controller' => 'users', 'action' => 'reset_password', $token), true);?>

diff --git a/views/elements/email/text/account_verification.ctp b/views/elements/email/text/account_verification.ctp old mode 100644 new mode 100755 diff --git a/views/elements/email/text/password_reset_request.ctp b/views/elements/email/text/password_reset_request.ctp old mode 100644 new mode 100755 diff --git a/views/elements/login.ctp b/views/elements/login.ctp old mode 100644 new mode 100755 diff --git a/views/elements/paging.ctp.php b/views/elements/paging.ctp.php new file mode 100644 index 000000000..77d7fc705 --- /dev/null +++ b/views/elements/paging.ctp.php @@ -0,0 +1,7 @@ +Paginator->counter(array( + 'format' => 'Page %page% of %pages%, + showing %current% records out of %count% total, + starting on record %start%, ending on %end%' +)); +?> \ No newline at end of file diff --git a/views/users/add.ctp b/views/users/add.ctp old mode 100644 new mode 100755 index 12a2f6e4f..a75e70d84 --- a/views/users/add.ctp +++ b/views/users/add.ctp @@ -10,16 +10,38 @@ */ ?>
-Form->create($model);?>
- Form->input('username'); - echo $this->Form->input('passwd'); - echo $this->Form->input('password_token'); - ?> + Form->create($model); + echo $this->Form->input('username', array( + 'error' => array( + 'unique_username' => __d('users', 'Please select a username that is not already in use', true), + 'username_min' => __d('users', 'Must be at least 3 characters', true), + 'alpha' => __d('users', 'Username must contain numbers and letters only', true), + 'required' => __d('users', 'Please choose username', true)))); + echo $this->Form->input('email', array( + 'label' => __d('users', 'E-mail (used as login)',true), + 'error' => array('isValid' => __d('users', 'Must be a valid email address', true), + 'isUnique' => __d('users', 'An account with that email already exists', true)))); + echo $this->Form->input('passwd', array( + 'label' => __d('users', 'Password',true), + 'type' => 'password', + 'error' => __d('users', 'Must be at least 5 characters long', true))); + echo $this->Form->input('temppassword', array( + 'label' => __d('users', 'Password (confirm)', true), + 'type' => 'password', + 'error' => __d('users', 'Passwords must match', true) + ) + ); + echo $this->Form->input('tos', array( + 'label' => __d('users', 'I have read and agreed to ', true) . $this->Html->link(__d('users', 'Terms of Service', true), array('controller' => 'pages', 'action' => 'tos')), + 'error' => __d('users', 'You must verify you have read the Terms of Service', true) + ) + ); + echo $this->Form->end(__d('users', 'Submit',true)); + ?>
-Form->end('Submit');?>
    diff --git a/views/users/admin_add.ctp b/views/users/admin_add.ctp old mode 100644 new mode 100755 diff --git a/views/users/admin_edit.ctp b/views/users/admin_edit.ctp old mode 100644 new mode 100755 diff --git a/views/users/admin_index.ctp b/views/users/admin_index.ctp old mode 100644 new mode 100755 diff --git a/views/users/admin_view.ctp b/views/users/admin_view.ctp old mode 100644 new mode 100755 diff --git a/views/users/change_password.ctp b/views/users/change_password.ctp old mode 100644 new mode 100755 diff --git a/views/users/dashboard.ctp b/views/users/dashboard.ctp old mode 100644 new mode 100755 index 838833a75..93fc07c12 --- a/views/users/dashboard.ctp +++ b/views/users/dashboard.ctp @@ -9,7 +9,18 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -
    -

    -

    +
    +

    + Gravatar)): ?> +
    + Gravatar->image($user[$model]['email']); ?> +
    + +
    +
    +

    +
      +
    • Html->link(__d('users', 'Logout', true), array('action' => 'logout')); ?>
    • +
    • Html->link(__d('users', 'Change Password', true), array('action' => 'change_password')); ?>
    • +
    \ No newline at end of file diff --git a/views/users/edit.ctp b/views/users/edit.ctp old mode 100644 new mode 100755 diff --git a/views/users/groups.ctp b/views/users/groups.ctp old mode 100644 new mode 100755 diff --git a/views/users/index.ctp b/views/users/index.ctp deleted file mode 100644 index a87620910..000000000 --- a/views/users/index.ctp +++ /dev/null @@ -1,59 +0,0 @@ - -
    -

    -

    -counter(array( -'format' => __d('users', 'Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true) -)); -?>

    - - - - - - - - > - - - - - -
    sort('username');?>sort('created');?>
    - - - - - Html->link(__d('users', 'View', true), array('action'=>'view', $user[$model]['id'])); ?> - Html->link(__d('users', 'Edit', true), array('action'=>'edit', $user[$model]['id'])); ?> - Html->link(__d('users', 'Delete', true), array('action'=>'delete', $user[$model]['id']), null, sprintf(__d('users', 'Are you sure you want to delete # %s?', true), $user[$model]['id'])); ?> -
    -
    -
    - prev('<< '.__d('users', 'previous', true), array(), null, array('class'=>'disabled'));?> - | numbers();?> - next(__d('users', 'next', true).' >>', array(), null, array('class'=>'disabled'));?> -
    -
    -
      -
    • Html->link(__d('users', 'New User', true), array('action'=>'add')); ?>
    • -
    -
    diff --git a/views/users/login.ctp b/views/users/login.ctp old mode 100644 new mode 100755 index bbabce902..8e89aa835 --- a/views/users/login.ctp +++ b/views/users/login.ctp @@ -9,18 +9,23 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    -
    - - Form->create($model, array( - 'action' => 'login')); - echo $this->Form->input('email', array( - 'label' => __d('users', 'Email', true))); - echo $this->Form->input('passwd', array( - 'label' => __d('users', 'Password', true))); - echo __d('users', 'Remember Me') . $this->Form->checkbox('remember_me'); - echo $this->Form->hidden('User.return_to', array('value' => $return_to)); - echo $this->Form->end(__d('users', 'Submit', true)); - ?> -
    \ No newline at end of file +
    +
    + + Form->create($model, array('url' => array('action' => 'login'))); + echo $this->Form->input('email', array('label' => __d('users', 'Email', true))); + echo $this->Form->input('passwd', array('label' => __d('users', 'Password', true))); + echo $this->Form->input('remember_me', array('type' => 'checkbox', 'label' => __d('users', 'Remember Me', true))); + echo $this->Form->hidden('User.return_to', array('value' => $return_to)); + echo $this->Form->end(__d('users', 'Submit', true)); + ?> +
    +
    +
    +

    +
      +
    • Html->link(__d('users', 'New User', true), array('action' => 'add')); ?>
    • +
    • Html->link(__d('users', 'Forgot Password', true), array('action' => 'reset_password')); ?>
    • +
    +
    \ No newline at end of file diff --git a/views/users/openid_add.ctp b/views/users/openid_add.ctp new file mode 100755 index 000000000..b3edb8dc8 --- /dev/null +++ b/views/users/openid_add.ctp @@ -0,0 +1,70 @@ + +
    +
    + + Form->create('Openid.OpenidUser', array('url' => array('plugin' => 'openid', 'controller' => 'openid_users', 'action' => 'attach_identity'))); + $oid = isset($openIdAuthData['openid_claimed_id']) ? $openIdAuthData['openid_claimed_id'] : $openIdAuthData['openid_identity']; + echo $this->Form->input('openid_identifier', array( + 'name' => 'data[OpenidUser][openid_url]', + 'class' => 'openid', + 'value' => $oid, + 'type' => 'hidden', + 'label' => __d('users', 'Openid Identifier', true) + ) + ); + + $username = isset($openIdAuthData['openid_sreg_nickname']) ? $openIdAuthData['openid_sreg_nickname'] : ''; + echo $this->Form->input('username', array( + 'value' => $username, + 'label' => __d('users', 'Username', true), + )); + + if (isset($this->params['named']['username_taken'])) { + echo $this->Form->input('username', array( + 'value' => $openIdAuthData['openid_sreg_nickname'], + 'label' => __d('users', 'Username', true), + ) + ); + } + + if (isset($openIdAuthData['openid_sreg_email'])) { + echo $this->Form->input('email', array( + 'value' => $openIdAuthData['openid_sreg_email'], + 'label' => __d('users', 'Email', true), + 'type' => 'hidden', + ) + ); + } elseif (isset($openIdAuthData['openid_ext1_value_email'])) { + echo $this->Form->input('email', array( + 'value' => $openIdAuthData['openid_ext1_value_email'], + 'label' => __d('users', 'Email', true), + 'type' => 'hidden', + ) + ); + } + echo $this->Form->input('tos', array( + 'type' => 'checkbox', + 'label' => __d('users', 'I have read and agreed to ', true) . $this->Html->link(__d('users', 'Terms of Service', true), array('controller' => 'pages', 'action' => 'tos')), + 'error' => __d('users', 'You must verify you have read the Terms of Service', true) + ) + ); + echo $this->Form->end(__d('users', 'Submit',true)); + ?> +
    +
    +
    +
      +
    • Html->link(__d('users', 'List Users', true), array('action'=>'index'));?>
    • +
    +
    diff --git a/views/users/register.ctp b/views/users/register.ctp old mode 100644 new mode 100755 diff --git a/views/users/request_password_change.ctp b/views/users/request_password_change.ctp old mode 100644 new mode 100755 diff --git a/views/users/reset_password.ctp b/views/users/reset_password.ctp old mode 100644 new mode 100755 diff --git a/views/users/search.ctp b/views/users/search.ctp old mode 100644 new mode 100755 diff --git a/views/users/view.ctp b/views/users/view.ctp old mode 100644 new mode 100755