diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..ffe6e83c6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ + +root = true + +[*] +charset = utf-8 +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..eaf460b13 --- /dev/null +++ b/.gitignore @@ -0,0 +1,101 @@ +#------------------------- +# Operating Specific Junk Files +#------------------------- + +# OS X +.DS_Store +.AppleDouble +.LSOverride + +# OS X Thumbnails +._* + +# Windows image file caches +Thumbs.db +ehthumbs.db +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Linux +*~ + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +#------------------------- +# Environment Files +#------------------------- +# These should never be under version control, +# as it poses a security risk. +.env +.vagrant +application/.env +Vagrantfile + +#------------------------- +# Test Files +#------------------------- +tests/coverage* + +# Don't save phpunit under version control. +phpunit + +#------------------------- +# Composer +#------------------------- +vendor/ +composer.lock + +#------------------------- +# IDE / Development Files +#------------------------- + +# Modules Testing +_modules/* + +# phpenv local config +.php-version + +# Jetbrains editors (PHPStorm, etc) +.idea/ +*.iml + +# Netbeans +nbproject/ +build/ +nbbuild/ +dist/ +nbdist/ +nbactions.xml +nb-configuration.xml +.nb-gradle/ + +# Sublime Text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache +*.sublime-workspace +*.sublime-project +.phpintel +/api/ + +# Visual Studio Code +.vscode/ + +/results/ +/phpunit*.xml + diff --git a/.prettyci.composer.json b/.prettyci.composer.json new file mode 100644 index 000000000..67a8e0206 --- /dev/null +++ b/.prettyci.composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "codeigniter4/codeigniter4-standard": "^1.0" + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 183cc869b..b77b972b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Ion Auth Changelog =================================== +## xx Octobre 2018 - Ion Auth 4 + +- **General:** + - Migration from CodeIgniter 3 to CodeIgniter 4 + - **New server requirements:** + - Drop CodeIgniter 3 support + - Drop PHP < 7.1 support + ## xx March 2018 - Ion Auth 3 - **General:** @@ -17,7 +25,7 @@ Ion Auth Changelog - Higher default hashing parameters (e.g. higher cost for bcrypt) - Allows different hashing parameters for admins - Remove `random_rounds` bcrypt feature - - Better default value for `forgot_password_expiration` + - Better default value for `forgotPasswordExpiration` - **Updated features:** - Update _Remember me_ feature for more security - Update _Password Reset_ feature for more security diff --git a/Config/IonAuth.php b/Config/IonAuth.php new file mode 100644 index 000000000..de281bcff --- /dev/null +++ b/Config/IonAuth.php @@ -0,0 +1,240 @@ + + * @author Phil Sturgeon + * @author Benoit VRIGNAUD + * @license https://opensource.org/licenses/MIT MIT License + * @link http://github.com/benedmunds/CodeIgniter-Ion-Auth + * @filesource + */ + +/** + * Configuration file for Ion Auth + * + * @package CodeIgniter-Ion-Auth + */ +class IonAuth extends \CodeIgniter\Config\BaseConfig +{ + + /** + * Database group name option. + * ------------------------------------------------------------------------- + * Allows to select a specific group for the database connection + * + * Default is empty: uses default group defined in CI's configuration + * (see application/config/database.php, $active_group variable) + * + * @var string + */ + public $databaseGroupName = ''; + + /** + * Tables (Database table names) + * + * @var array + */ + public $tables = [ + 'users' => 'users', + 'groups' => 'groups', + 'users_groups' => 'users_groups', + 'login_attempts' => 'login_attempts', + ]; + + /** + * Users table column and Group table column you want to join WITH. + * Joins from users.id + * Joins from groups.id + * + * @var array + */ + public $join = [ + 'users' => 'user_id', + 'groups' => 'group_id', + ]; + + /* + | ------------------------------------------------------------------------- + | Hash Method (bcrypt or argon2) + | ------------------------------------------------------------------------- + | Bcrypt is available in PHP 5.3+ + | Argon2 is available in PHP 7.2 + | + | Argon2 is recommended by expert (it is actually the winner of the Password Hashing Competition + | for more information see https://password-hashing.net). So if you can (PHP 7.2), go for it. + | + | Bcrypt specific: + | bcryptDefaultCost settings: This defines how strong the encryption will be. + | However, higher the cost, longer it will take to hash (CPU usage) So adjust + | this based on your server hardware. + | + | You can (and should!) benchmark your server. This can be done easily with this little script: + | https://gist.github.com/Indigo744/24062e07477e937a279bc97b378c3402 + | + | With bcrypt, an example hash of "password" is: + | $2y$08$200Z6ZZbp3RAEXoaWcMA6uJOFicwNZaqk4oDhqTUiFXFe63MG.Daa + | + | A specific parameter bcryptAdminCost is available for user in admin group. + | It is recommended to have a stronger hashing for administrators. + | + | Argon2 specific: + | argon2DefaultParams settings: This is an array containing the options for the Argon2 algorithm. + | You can define 3 differents keys: + | memory_cost (default 4096 kB) + | Maximum memory (in kBytes) that may be used to compute the Argon2 hash + | The spec recommends setting the memory cost to a power of 2. + | time_cost (default 2) + | Number of iterations (used to tune the running time independently of the memory size). + | This defines how strong the encryption will be. + | threads (default 2) + | Number of threads to use for computing the Argon2 hash + | The spec recommends setting the number of threads to a power of 2. + | + | You can (and should!) benchmark your server. This can be done easily with this little script: + | https://gist.github.com/Indigo744/e92356282eb808b94d08d9cc6e37884c + | + | With argon2, an example hash of "password" is: + | $argon2i$v=19$m=1024,t=2,p=2$VEFSSU4wSzh3cllVdE1JZQ$PDeks/7JoKekQrJa9HlfkXIk8dAeZXOzUxLBwNFbZ44 + | + | A specific parameter argon2AdminParams is available for user in admin group. + | It is recommended to have a stronger hashing for administrators. + | + | For more information, check the password_hash function help: http://php.net/manual/en/function.password-hash.php + | + */ + public $hashMethod = 'bcrypt'; // bcrypt or argon2 + public $bcryptDefaultCost = 10; // Set cost according to your server benchmark - but no lower than 10 (default PHP value) + public $bcryptAdminCost = 12; // Cost for user in admin group + public $argon2DefaultParams = [ + 'memory_cost' => 1 << 12, // 4MB + 'time_cost' => 2, + 'threads' => 2, + ]; + public $argon2AdminParams = [ + 'memory_cost' => 1 << 14, // 16MB + 'time_cost' => 4, + 'threads' => 2, + ]; + + /* + | ------------------------------------------------------------------------- + | Authentication options. + | ------------------------------------------------------------------------- + | maximumLoginAttempts: This maximum is not enforced by the library, but is used by + | is_max_login_attempts_exceeded(). + | The controller should check this function and act appropriately. + | If this variable set to 0, there is no maximum. + | minPasswordLength: This minimum is not enforced directly by the library. + | The controller should define a validation rule to enforce it. + | See the Auth controller for an example implementation. + | + | The library will fail for empty password or password size above 4096 bytes. + | This is an arbitrary (long) value to protect against DOS attack. + */ + public $siteTitle = 'Example.com'; // Site Title, example.com + public $adminEmail = 'admin@example.com'; // Admin Email, admin@example.com + public $defaultGroup = 'members'; // Default group, use name + public $adminGroup = 'admin'; // Default administrators group, use name + public $identity = 'email'; /* You can use any unique column in your table as identity column. + IMPORTANT: If you are changing it from the default (email), + update the UNIQUE constraint in your DB */ + public $minPasswordLength = 8; // Minimum Required Length of Password (not enforced by lib - see note above) + public $emailActivation = false; // Email Activation for registration + public $manualActivation = false; // Manual Activation for registration + public $rememberUsers = true; // Allow users to be remembered and enable auto-login + public $userExpire = 86500; // How long to remember the user (seconds). Set to zero for no expiration + public $userExtendonLogin = false; // Extend the users cookies every time they auto-login + public $trackLoginAttempts = true; // Track the number of failed login attempts for each user or ip. + public $trackLoginIpAddress = true; // Track login attempts by IP Address, if false will track based on identity. (Default: true) + public $maximumLoginAttempts = 3; // The maximum number of failed login attempts. + public $lockoutTime = 600; /* The number of seconds to lockout an account due to exceeded attempts + You should not use a value below 60 (1 minute) */ + public $forgotPasswordExpiration = 1800; /* The number of seconds after which a forgot password request will expire. If set to 0, forgot password requests will not expire. + 30 minutes to 1 hour are good values (enough for a user to receive the email and reset its password) + You should not set a value too high, as it would be a security issue! */ + public $recheckTimer = 0; /* The number of seconds after which the session is checked again against database to see if the user still exists and is active. + Leave 0 if you don't want session recheck. if you really think you need to recheck the session against database, we would + recommend a higher value, as this would affect performance */ + + /** + * Cookie options. + * rememberCookieName Default: remember_code + * + * @var string + */ + public $rememberCookieName = 'remember_code'; + + /* + | ------------------------------------------------------------------------- + | Email options. + | ------------------------------------------------------------------------- + | emailConfig: + | 'file' = Use the default CI config or use from a config file + | array = Manually set your email config settings + */ + public $useCiEmail = false; // Send Email using the builtin CI email class, if false it will return the code and the identity + public $emailConfig = [ + 'mailtype' => 'html', + ]; + + /** + * Email templates. + * Folder where email templates are stored. + * Default: IonAuth\\Views\\auth\\email\\ + * + * @var string + */ + public $emailTemplates = 'IonAuth\\Views\\auth\\email\\'; + + /** + * ------------------------------------------------------------------------- + * Activate Account Email Template + * ------------------------------------------------------------------------- + * Default: activate.tpl.php + * + * @var string + */ + public $emailActivate = 'activate.tpl.php'; + + /** + * ------------------------------------------------------------------------- + * Forgot Password Email Template + * ------------------------------------------------------------------------- + * Default: forgot_password.tpl.php + * + * @var string + */ + public $emailForgotPassword = 'forgot_password.tpl.php'; + + /** + * Specifies the views that are used to display the + * errors and messages. + * + * @var array + */ + public $templates = [ + + // templates for errors cf : https://bcit-ci.github.io/CodeIgniter4/libraries/validation.html#configuration + 'errors' => [ + 'list' => 'list', + ], + + // templates for messages + 'messages' => [ + 'list' => 'IonAuth\Views\Messages\list', + 'single' => 'IonAuth\Views\Messages\single', + ], + ]; +} diff --git a/Controllers/Auth.php b/Controllers/Auth.php new file mode 100644 index 000000000..35da53abf --- /dev/null +++ b/Controllers/Auth.php @@ -0,0 +1,936 @@ + + * @author Benoit VRIGNAUD + * @license https://opensource.org/licenses/MIT MIT License + */ +class Auth extends \CodeIgniter\Controller +{ + + /** + * + * @var array + */ + public $data = []; + + /** + * Configuration + * + * @var \IonAuth\Config\IonAuth + */ + protected $configIonAuth; + + /** + * IonAuth library + * + * @var \IonAuth\Libraries\IonAuth + */ + protected $ionAuth; + + /** + * Session + * + * @var \CodeIgniter\Session\Session + */ + private $session; + + /** + * Validation library + * + * @var \CodeIgniter\Validation\Validation + */ + private $validation; + + /** + * Validation list template. + * + * @var string + * @see https://bcit-ci.github.io/CodeIgniter4/libraries/validation.html#configuration + */ + protected $validationListTemplate = 'list'; + + /** + * Views folder + * Set it to 'auth' if your views files are in the standard application/Views/auth + * + * @var string + */ + protected $viewsFolder = 'IonAuth\Views\auth'; + + /** + * Constructor + * + * @return void + */ + public function __construct() + { + $this->ionAuth = new \IonAuth\Libraries\IonAuth(); + $this->validation = \Config\Services::validation(); + helper(['form', 'url']); + $this->configIonAuth = config('IonAuth'); + $this->session = \Config\Services::session(); + + if (! empty($this->configIonAuth->templates['errors']['list'])) + { + $this->validationListTemplate = $this->configIonAuth->templates['errors']['list']; + } + } + + /** + * Redirect if needed, otherwise display the user list + * + * @return string|\CodeIgniter\HTTP\RedirectResponse + */ + public function index() + { + if (! $this->ionAuth->loggedIn()) + { + // redirect them to the login page + return redirect('auth/login'); + } + else if (! $this->ionAuth->isAdmin()) // remove this elseif if you want to enable this for non-admins + { + // redirect them to the home page because they must be an administrator to view this + //show_error('You must be an administrator to view this page.'); + throw new \Exception('You must be an administrator to view this page.'); + } + else + { + $this->data['title'] = lang('Auth.index_heading'); + + // set the flash data error message if there is one + $this->data['message'] = $this->validation->getErrors() ? $this->validation->listErrors($this->validationListTemplate) : $this->session->getFlashdata('message'); + //list the users + $this->data['users'] = $this->ionAuth->users()->result(); + foreach ($this->data['users'] as $k => $user) + { + $this->data['users'][$k]->groups = $this->ionAuth->getUsersGroups($user->id)->getResult(); + } + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'index', $this->data); + } + } + + /** + * Log the user in + * + * @return string|\CodeIgniter\HTTP\RedirectResponse + */ + public function login() + { + $this->data['title'] = lang('Auth.login_heading'); + + // validate form input + $this->validation->setRule('identity', str_replace(':', '', lang('Auth.login_identity_label')), 'required'); + $this->validation->setRule('password', str_replace(':', '', lang('Auth.login_password_label')), 'required'); + + if ($this->request->getPost() && $this->validation->withRequest($this->request)->run()) + { + // check to see if the user is logging in + // check for "remember me" + $remember = (bool)$this->request->getVar('remember'); + + if ($this->ionAuth->login($this->request->getVar('identity'), $this->request->getVar('password'), $remember)) + { + //if the login is successful + //redirect them back to the home page + $this->session->setFlashdata('message', $this->ionAuth->messages()); + return redirect('/'); + } + else + { + // if the login was un-successful + // redirect them back to the login page + $this->session->setFlashdata('message', $this->ionAuth->errors($this->validationListTemplate)); + // use redirects instead of loading views for compatibility with MY_Controller libraries + return redirect()->back()->withInput(); + } + } + else + { + // the user is not logging in so display the login page + // set the flash data error message if there is one + $this->data['message'] = $this->validation->getErrors() ? $this->validation->listErrors($this->validationListTemplate) : $this->session->getFlashdata('message'); + + $this->data['identity'] = [ + 'name' => 'identity', + 'id' => 'identity', + 'type' => 'text', + 'value' => set_value('identity'), + ]; + + $this->data['password'] = [ + 'name' => 'password', + 'id' => 'password', + 'type' => 'password', + ]; + + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'login', $this->data); + } + } + + /** + * Log the user out + * + * @return \CodeIgniter\HTTP\RedirectResponse + */ + public function logout() + { + $this->data['title'] = 'Logout'; + + // log the user out + $this->ionAuth->logout(); + + // redirect them to the login page + $this->session->setFlashdata('message', $this->ionAuth->messages()); + return redirect('/auth/login'); + } + + /** + * Change password + * + * @return string|\CodeIgniter\HTTP\RedirectResponse + */ + public function change_password() + { + $this->validation->setRule('old', lang('Auth.change_password_validation_old_password_label'), 'required'); + $this->validation->setRule('new', lang('Auth.change_password_validation_new_password_label'), 'required|min_length[' . $this->configIonAuth->minPasswordLength . ']|matches[new_confirm]'); + $this->validation->setRule('new_confirm', lang('Auth.change_password_validation_new_password_confirm_label'), 'required'); + + if (! $this->ionAuth->loggedIn()) + { + return redirect('auth/login'); + } + + $user = $this->ionAuth->user()->row(); + + if ($this->validation->run() === false) + { + // display the form + // set the flash data error message if there is one + $this->data['message'] = ($this->validation->getErrors()) ? $this->validation->listErrors($this->validationListTemplate) : $this->session->getFlashdata('message'); + + $this->data['minPasswordLength'] = $this->configIonAuth->minPasswordLength; + $this->data['old_password'] = [ + 'name' => 'old', + 'id' => 'old', + 'type' => 'password', + ]; + $this->data['new_password'] = [ + 'name' => 'new', + 'id' => 'new', + 'type' => 'password', + 'pattern' => '^.{' . $this->data['minPasswordLength'] . '}.*$', + ]; + $this->data['new_password_confirm'] = [ + 'name' => 'new_confirm', + 'id' => 'new_confirm', + 'type' => 'password', + 'pattern' => '^.{' . $this->data['minPasswordLength'] . '}.*$', + ]; + $this->data['user_id'] = [ + 'name' => 'user_id', + 'id' => 'user_id', + 'type' => 'hidden', + 'value' => $user->id, + ]; + + // render + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'change_password', $this->data); + } + else + { + $identity = $this->session->userdata('identity'); + + $change = $this->ionAuth->changePassword($identity, $this->request->getPost('old'), $this->request->getPost('new')); + + if ($change) + { + //if the password was successfully changed + $this->session->setFlashdata('message', $this->ionAuth->messages()); + $this->logout(); + } + else + { + $this->session->setFlashdata('message', $this->ionAuth->errors($this->validationListTemplate)); + return redirect('auth/change_password'); + } + } + } + + /** + * Forgot password + * + * @return string|\CodeIgniter\HTTP\RedirectResponse + */ + public function forgot_password() + { + $this->data['title'] = lang('Auth.forgot_password_heading'); + + // setting validation rules by checking whether identity is username or email + if ($this->configIonAuth->identity !== 'email') + { + $this->validation->setRule('identity', lang('Auth.forgot_password_identity_label'), 'required'); + } + else + { + $this->validation->setRule('identity', lang('Auth.forgot_password_validation_email_label'), 'required|valid_email'); + } + + if (! ($this->request->getPost() && $this->validation->withRequest($this->request)->run())) + { + $this->data['type'] = $this->configIonAuth->identity; + // setup the input + $this->data['identity'] = [ + 'name' => 'identity', + 'id' => 'identity', + ]; + + if ($this->configIonAuth->identity !== 'email') + { + $this->data['identity_label'] = lang('Auth.forgot_password_identity_label'); + } + else + { + $this->data['identity_label'] = lang('Auth.forgot_password_email_identity_label'); + } + + // set any errors and display the form + $this->data['message'] = $this->validation->getErrors() ? $this->validation->listErrors($this->validationListTemplate) : $this->session->getFlashdata('message'); + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'forgot_password', $this->data); + } + else + { + $identityColumn = $this->configIonAuth->identity; + $identity = $this->ionAuth->where($identityColumn, $this->request->getPost('identity'))->users()->row(); + + if (empty($identity)) + { + if ($this->configIonAuth->identity !== 'email') + { + $this->ionAuth->setError('Auth.forgot_password_identity_not_found'); + } + else + { + $this->ionAuth->setError('Auth.forgot_password_email_not_found'); + } + + $this->session->setFlashdata('message', $this->ionAuth->errors($this->validationListTemplate)); + return redirect('/auth/forgot_password'); + } + + // run the forgotten password method to email an activation code to the user + $forgotten = $this->ionAuth->forgottenPassword($identity->{$this->configIonAuth->identity}); + + if ($forgotten) + { + // if there were no errors + $this->session->setFlashdata('message', $this->ionAuth->messages()); + return redirect('/auth/login'); //we should display a confirmation page here instead of the login page + } + else + { + $this->session->setFlashdata('message', $this->ionAuth->errors($this->validationListTemplate)); + return redirect('/auth/forgot_password'); + } + } + } + + /** + * Reset password - final step for forgotten password + * + * @param string|null $code The reset code + * + * @return string|\CodeIgniter\HTTP\RedirectResponse + */ + public function reset_password($code = null) + { + if (! $code) + { + throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound(); + } + + $this->data['title'] = lang('Auth.reset_password_heading'); + + $user = $this->ionAuth->forgottenPasswordCheck($code); + + if ($user) + { + // if the code is valid then display the password reset form + + $this->validation->setRule('new', lang('Auth.reset_password_validation_new_password_label'), 'required|min_length[' . $this->configIonAuth->minPasswordLength . ']|matches[new_confirm]'); + $this->validation->setRule('new_confirm', lang('Auth.reset_password_validation_new_password_confirm_label'), 'required'); + + if (! $this->request->getPost() || $this->validation->withRequest($this->request)->run() === false) + { + // display the form + + // set the flash data error message if there is one + $this->data['message'] = $this->validation->getErrors() ? $this->validation->listErrors($this->validationListTemplate) : $this->session->getFlashdata('message'); + + $this->data['minPasswordLength'] = $this->configIonAuth->minPasswordLength; + $this->data['new_password'] = [ + 'name' => 'new', + 'id' => 'new', + 'type' => 'password', + 'pattern' => '^.{' . $this->data['minPasswordLength'] . '}.*$', + ]; + $this->data['new_password_confirm'] = [ + 'name' => 'new_confirm', + 'id' => 'new_confirm', + 'type' => 'password', + 'pattern' => '^.{' . $this->data['minPasswordLength'] . '}.*$', + ]; + $this->data['user_id'] = [ + 'name' => 'user_id', + 'id' => 'user_id', + 'type' => 'hidden', + 'value' => $user->id, + ]; + $this->data['code'] = $code; + + // render + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'reset_password', $this->data); + } + else + { + $identity = $user->{$this->configIonAuth->identity}; + + // do we have a valid request? + if ($user->id != $this->request->getPost('user_id')) + { + // something fishy might be up + $this->ionAuth->clearForgottenPasswordCode($identity); + + throw new \Exception(lang('Auth.error_security')); + } + else + { + // finally change the password + $change = $this->ionAuth->resetPassword($identity, $this->request->getPost('new')); + + if ($change) + { + // if the password was successfully changed + $this->session->setFlashdata('message', $this->ionAuth->messages()); + return redirect('/auth/login'); + } + else + { + $this->session->setFlashdata('message', $this->ionAuth->errors($this->validationListTemplate)); + return redirect('/auth/reset_password/' . $code); + } + } + } + } + else + { + // if the code is invalid then send them back to the forgot password page + $this->session->setFlashdata('message', $this->ionAuth->errors($this->validationListTemplate)); + return redirect('/auth/forgot_password'); + } + } + + /** + * Activate the user + * + * @param integer $id The user ID + * @param string $code The activation code + * + * @return \CodeIgniter\HTTP\RedirectResponse + */ + public function activate(int $id, string $code = ''): \CodeIgniter\HTTP\RedirectResponse + { + $activation = false; + + if (! $code) + { + $activation = $this->ionAuth->activate($id, $code); + } + else if ($this->ionAuth->isAdmin()) + { + $activation = $this->ionAuth->activate($id); + } + + if ($activation) + { + // redirect them to the auth page + $this->session->setFlashdata('message', $this->ionAuth->messages()); + return redirect('/auth'); + } + else + { + // redirect them to the forgot password page + $this->session->setFlashdata('message', $this->ionAuth->errors($this->validationListTemplate)); + return redirect('/auth/forgot_password'); + } + } + + /** + * Deactivate the user + * + * @param integer $id The user ID + * + * @throw Exception + * + * @return string|\CodeIgniter\HTTP\RedirectResponse + */ + public function deactivate(int $id = 0) + { + if (! $this->ionAuth->loggedIn() || ! $this->ionAuth->isAdmin()) + { + // redirect them to the home page because they must be an administrator to view this + throw new \Exception('You must be an administrator to view this page.'); + // TODO : I think it could be nice to have a dedicated exception like '\IonAuth\Exception\NotAllowed + } + + $this->validation->setRule('confirm', lang('Auth.deactivate_validation_confirm_label'), 'required'); + $this->validation->setRule('id', lang('Auth.deactivate_validation_user_id_label'), 'required|integer'); + + if (! $this->validation->withRequest($this->request)->run()) + { + $this->data['user'] = $this->ionAuth->user($id)->row(); + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'deactivate_user', $this->data); + } + else + { + // do we really want to deactivate? + if ($this->request->getPost('confirm') === 'yes') + { + // do we have a valid request? + if ($id !== $this->request->getPost('id', FILTER_VALIDATE_INT)) + { + throw new \Exception(lang('Auth.error_security')); + } + + // do we have the right userlevel? + if ($this->ionAuth->loggedIn() && $this->ionAuth->isAdmin()) + { + $message = $this->ionAuth->deactivate($id) ? $this->ionAuth->messages() : $this->ionAuth->errors($this->validationListTemplate); + $this->session->setFlashdata('message', $message); + } + } + + // redirect them back to the auth page + return redirect('/auth'); + } + } + + /** + * Create a new user + * + * @return string|\CodeIgniter\HTTP\RedirectResponse + */ + public function create_user() + { + $this->data['title'] = lang('Auth.create_user_heading'); + + if (! $this->ionAuth->loggedIn() || ! $this->ionAuth->isAdmin()) + { + return redirect('/auth'); + } + + $tables = $this->configIonAuth->tables; + $identityColumn = $this->configIonAuth->identity; + $this->data['identity_column'] = $identityColumn; + + // validate form input + $this->validation->setRule('first_name', lang('Auth.create_user_validation_fname_label'), 'trim|required'); + $this->validation->setRule('last_name', lang('Auth.create_user_validation_lname_label'), 'trim|required'); + if ($identityColumn !== 'email') + { + $this->validation->setRule('identity', lang('Auth.create_user_validation_identity_label'), 'trim|required|is_unique[' . $tables['users'] . '.' . $identityColumn . ']'); + $this->validation->setRule('email', lang('Auth.create_user_validation_email_label'), 'trim|required|valid_email'); + } + else + { + $this->validation->setRule('email', lang('Auth.create_user_validation_email_label'), 'trim|required|valid_email|is_unique[' . $tables['users'] . '.email]'); + } + $this->validation->setRule('phone', lang('Auth.create_user_validation_phone_label'), 'trim'); + $this->validation->setRule('company', lang('Auth.create_user_validation_company_label'), 'trim'); + $this->validation->setRule('password', lang('Auth.create_user_validation_password_label'), 'required|min_length[' . $this->configIonAuth->minPasswordLength . ']|matches[password_confirm]'); + $this->validation->setRule('password_confirm', lang('Auth.create_user_validation_password_confirm_label'), 'required'); + + if ($this->request->getPost() && $this->validation->withRequest($this->request)->run()) + { + $email = strtolower($this->request->getPost('email')); + $identity = ($identityColumn === 'email') ? $email : $this->request->getPost('identity'); + $password = $this->request->getPost('password'); + + $additionalData = [ + 'first_name' => $this->request->getPost('first_name'), + 'last_name' => $this->request->getPost('last_name'), + 'company' => $this->request->getPost('company'), + 'phone' => $this->request->getPost('phone'), + ]; + } + if ($this->request->getPost() && $this->validation->withRequest($this->request)->run() && $this->ionAuth->register($identity, $password, $email, $additionalData)) + { + // check to see if we are creating the user + // redirect them back to the admin page + $this->session->setFlashdata('message', $this->ionAuth->messages()); + return redirect('/auth'); + } + else + { + // display the create user form + // set the flash data error message if there is one + $this->data['message'] = $this->validation->getErrors() ? $this->validation->listErrors($this->validationListTemplate) : ($this->ionAuth->errors($this->validationListTemplate) ? $this->ionAuth->errors($this->validationListTemplate) : $this->session->getFlashdata('message')); + + $this->data['first_name'] = [ + 'name' => 'first_name', + 'id' => 'first_name', + 'type' => 'text', + 'value' => set_value('first_name'), + ]; + $this->data['last_name'] = [ + 'name' => 'last_name', + 'id' => 'last_name', + 'type' => 'text', + 'value' => set_value('last_name'), + ]; + $this->data['identity'] = [ + 'name' => 'identity', + 'id' => 'identity', + 'type' => 'text', + 'value' => set_value('identity'), + ]; + $this->data['email'] = [ + 'name' => 'email', + 'id' => 'email', + 'type' => 'email', + 'value' => set_value('email'), + ]; + $this->data['company'] = [ + 'name' => 'company', + 'id' => 'company', + 'type' => 'text', + 'value' => set_value('company'), + ]; + $this->data['phone'] = [ + 'name' => 'phone', + 'id' => 'phone', + 'type' => 'text', + 'value' => set_value('phone'), + ]; + $this->data['password'] = [ + 'name' => 'password', + 'id' => 'password', + 'type' => 'password', + 'value' => set_value('password'), + ]; + $this->data['password_confirm'] = [ + 'name' => 'password_confirm', + 'id' => 'password_confirm', + 'type' => 'password', + 'value' => set_value('password_confirm'), + ]; + + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'create_user', $this->data); + } + } + + /** + * Redirect a user checking if is admin + * + * @return \CodeIgniter\HTTP\RedirectResponse + */ + public function redirectUser() + { + if ($this->ionAuth->isAdmin()) + { + return redirect('/auth'); + } + return redirect('/'); + } + + /** + * Edit a user + * + * @param integer $id User id + * + * @return string string|\CodeIgniter\HTTP\RedirectResponse + */ + public function edit_user(int $id) + { + $this->data['title'] = lang('Auth.edit_user_heading'); + + if (! $this->ionAuth->loggedIn() || (! $this->ionAuth->isAdmin() && ! ($this->ionAuth->user()->row()->id == $id))) + { + return redirect('/auth'); + } + + $user = $this->ionAuth->user($id)->row(); + $groups = $this->ionAuth->groups()->resultArray(); + $currentGroups = $this->ionAuth->getUsersGroups($id)->getResult(); + + if (! empty($_POST)) + { + // validate form input + $this->validation->setRule('first_name', lang('Auth.edit_user_validation_fname_label'), 'trim|required'); + $this->validation->setRule('last_name', lang('Auth.edit_user_validation_lname_label'), 'trim|required'); + $this->validation->setRule('phone', lang('Auth.edit_user_validation_phone_label'), 'trim|required'); + $this->validation->setRule('company', lang('Auth.edit_user_validation_company_label'), 'trim|required'); + + // do we have a valid request? + if ($id !== $this->request->getPost('id', FILTER_VALIDATE_INT)) + { + //show_error(lang('Auth.error_security')); + throw new \Exception(lang('Auth.error_security')); + } + + // update the password if it was posted + if ($this->request->getPost('password')) + { + $this->validation->setRule('password', lang('Auth.edit_user_validation_password_label'), 'required|min_length[' . $this->configIonAuth->minPasswordLength . ']|matches[password_confirm]'); + $this->validation->setRule('password_confirm', lang('Auth.edit_user_validation_password_confirm_label'), 'required'); + } + + if ($this->request->getPost() && $this->validation->withRequest($this->request)->run()) + { + $data = [ + 'first_name' => $this->request->getPost('first_name'), + 'last_name' => $this->request->getPost('last_name'), + 'company' => $this->request->getPost('company'), + 'phone' => $this->request->getPost('phone'), + ]; + + // update the password if it was posted + if ($this->request->getPost('password')) + { + $data['password'] = $this->request->getPost('password'); + } + + // Only allow updating groups if user is admin + if ($this->ionAuth->isAdmin()) + { + // Update the groups user belongs to + $groupData = $this->request->getPost('groups'); + + if (! empty($groupData)) + { + $this->ionAuth->removeFromGroup('', $id); + + foreach ($groupData as $grp) + { + $this->ionAuth->addToGroup($grp, $id); + } + } + } + + // check to see if we are updating the user + if ($this->ionAuth->update($user->id, $data)) + { + // redirect them back to the admin page if admin, or to the base url if non admin + $this->session->setFlashdata('message', $this->ionAuth->messages()); + return $this->redirectUser(); + } + else + { + // redirect them back to the admin page if admin, or to the base url if non admin + $this->session->setFlashdata('message', $this->ionAuth->errors($this->validationListTemplate)); + return $this->redirectUser(); + } + } + } + + // display the edit user form + + // set the flash data error message if there is one + $this->data['message'] = $this->validation->getErrors() ? $this->validation->listErrors($this->validationListTemplate) : ($this->ionAuth->errors($this->validationListTemplate) ? $this->ionAuth->errors($this->validationListTemplate) : $this->session->getFlashdata('message')); + + // pass the user to the view + $this->data['user'] = $user; + $this->data['groups'] = $groups; + $this->data['currentGroups'] = $currentGroups; + + $this->data['first_name'] = [ + 'name' => 'first_name', + 'id' => 'first_name', + 'type' => 'text', + 'value' => set_value('first_name', $user->first_name ?: ''), + ]; + $this->data['last_name'] = [ + 'name' => 'last_name', + 'id' => 'last_name', + 'type' => 'text', + 'value' => set_value('last_name', $user->last_name ?: ''), + ]; + $this->data['company'] = [ + 'name' => 'company', + 'id' => 'company', + 'type' => 'text', + 'value' => set_value('company', empty($user->company) ? '' : $user->company), + ]; + $this->data['phone'] = [ + 'name' => 'phone', + 'id' => 'phone', + 'type' => 'text', + 'value' => set_value('phone', empty($user->phone) ? '' : $user->phone), + ]; + $this->data['password'] = [ + 'name' => 'password', + 'id' => 'password', + 'type' => 'password', + ]; + $this->data['password_confirm'] = [ + 'name' => 'password_confirm', + 'id' => 'password_confirm', + 'type' => 'password', + ]; + $this->data['ionAuth'] = $this->ionAuth; + + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'edit_user', $this->data); + } + + /** + * Create a new group + * + * @return string string|\CodeIgniter\HTTP\RedirectResponse + */ + public function create_group() + { + $this->data['title'] = lang('Auth.create_group_title'); + + if (! $this->ionAuth->loggedIn() || ! $this->ionAuth->isAdmin()) + { + return redirect('/auth'); + } + + // validate form input + $this->validation->setRule('group_name', lang('Auth.create_group_validation_name_label'), 'trim|required|alpha_dash'); + + if ($this->request->getPost() && $this->validation->withRequest($this->request)->run()) + { + $newGroupId = $this->ionAuth->createGroup($this->request->getPost('group_name'), $this->request->getPost('description')); + if ($newGroupId) + { + // check to see if we are creating the group + // redirect them back to the admin page + $this->session->setFlashdata('message', $this->ionAuth->messages()); + return redirect('/auth'); + } + } + else + { + // display the create group form + // set the flash data error message if there is one + $this->data['message'] = $this->validation->getErrors() ? $this->validation->listErrors($this->validationListTemplate) : ($this->ionAuth->errors($this->validationListTemplate) ? $this->ionAuth->errors($this->validationListTemplate) : $this->session->getFlashdata('message')); + + $this->data['group_name'] = [ + 'name' => 'group_name', + 'id' => 'group_name', + 'type' => 'text', + 'value' => set_value('group_name'), + ]; + $this->data['description'] = [ + 'name' => 'description', + 'id' => 'description', + 'type' => 'text', + 'value' => set_value('description'), + ]; + + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'create_group', $this->data); + } + } + + /** + * Edit a group + * + * @param integer $id Group id + * + * @return string|CodeIgniter\Http\Response + */ + public function edit_group(int $id = 0) + { + // bail if no group id given + if (! $id) + { + return redirect('/auth'); + } + + $this->data['title'] = lang('Auth.edit_group_title'); + + if (! $this->ionAuth->loggedIn() || ! $this->ionAuth->isAdmin()) + { + return redirect('/auth'); + } + + $group = $this->ionAuth->group($id)->row(); + + // validate form input + $this->validation->setRule('group_name', lang('Auth.edit_group_validation_name_label'), 'required|alpha_dash'); + + if ($this->request->getPost()) + { + if ($this->validation->withRequest($this->request)->run()) + { + $groupUpdate = $this->ionAuth->updateGroup($id, $this->request->getPost('group_name'), ['description' => $this->request->getPost('group_description')]); + + if ($groupUpdate) + { + $this->session->setFlashdata('message', lang('Auth.edit_group_saved')); + } + else + { + $this->session->setFlashdata('message', $this->ionAuth->errors($this->validationListTemplate)); + } + return redirect('/auth'); + } + } + + // set the flash data error message if there is one + $this->data['message'] = $this->validation->listErrors($this->validationListTemplate) ?: ($this->ionAuth->errors($this->validationListTemplate) ?: $this->session->getFlashdata('message')); + + // pass the user to the view + $this->data['group'] = $group; + + $readonly = $this->configIonAuth->adminGroup === $group->name ? 'readonly' : ''; + + $this->data['group_name'] = [ + 'name' => 'group_name', + 'id' => 'group_name', + 'type' => 'text', + 'value' => set_value('group_name', $group->name), + $readonly => $readonly, + ]; + $this->data['group_description'] = [ + 'name' => 'group_description', + 'id' => 'group_description', + 'type' => 'text', + 'value' => set_value('group_description', $group->description), + ]; + + return $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'edit_group', $this->data); + } + + /** + * Render the specified view + * + * @param string $view The name of the file to load + * @param array|null $data An array of key/value pairs to make available within the view. + * @param boolean $returnHtml If true return html string + * + * @return string|void + */ + protected function renderPage(string $view, $data = null, bool $returnHtml = true): string + { + $viewdata = $data ?: $this->data; + + $viewHtml = view($view, $viewdata); + + if ($returnHtml) + { + return $viewHtml; + } + else + { + echo $viewHtml; + } + } +} diff --git a/Database/Migrations/20181112100537_install_ion_auth.php b/Database/Migrations/20181112100537_install_ion_auth.php new file mode 100644 index 000000000..d5549a96c --- /dev/null +++ b/Database/Migrations/20181112100537_install_ion_auth.php @@ -0,0 +1,294 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link http://github.com/benedmunds/CodeIgniter-Ion-Auth + */ + +/** + * Migration class + * + * @package CodeIgniter-Ion-Auth + */ +class Migration_Install_ion_auth extends \CodeIgniter\Database\Migration +{ + /** + * Tables + * + * @var array + */ + private $tables; + + /** + * Construct + * + * @return void + */ + public function __construct() + { + $config = config('IonAuth\\Config\\IonAuth'); + + // initialize the database + $this->DBGroup = empty($config->databaseGroupName) ? '' : $config->databaseGroupName; + + parent::__construct(); + + $this->tables = $config->tables; + } + + /** + * Up + * + * @return void + */ + public function up() + { + // Drop table 'groups' if it exists + $this->forge->dropTable($this->tables['groups'], true); + + // Table structure for table 'groups' + $this->forge->addField([ + 'id' => [ + 'type' => 'MEDIUMINT', + 'constraint' => '8', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'name' => [ + 'type' => 'VARCHAR', + 'constraint' => '20', + ], + 'description' => [ + 'type' => 'VARCHAR', + 'constraint' => '100', + ], + ]); + $this->forge->addKey('id', true); + $this->forge->createTable($this->tables['groups']); + + // Dumping data for table 'groups' + $data = [ + [ + 'name' => 'admin', + 'description' => 'Administrator', + ], + [ + 'name' => 'members', + 'description' => 'General User', + ], + ]; + $this->db->table($this->tables['groups'])->insertBatch($data); + + // Drop table 'users' if it exists + $this->forge->dropTable($this->tables['users'], true); + + // Table structure for table 'users' + $this->forge->addField([ + 'id' => [ + 'type' => 'MEDIUMINT', + 'constraint' => '8', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'ip_address' => [ + 'type' => 'VARCHAR', + 'constraint' => '45', + ], + 'username' => [ + 'type' => 'VARCHAR', + 'constraint' => '100', + ], + 'password' => [ + 'type' => 'VARCHAR', + 'constraint' => '80', + ], + 'email' => [ + 'type' => 'VARCHAR', + 'constraint' => '254', + 'unique' => true, + ], + 'activation_selector' => [ + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => true, + 'unique' => true, + ], + 'activation_code' => [ + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => true, + ], + 'forgotten_password_selector' => [ + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => true, + 'unique' => true, + ], + 'forgotten_password_code' => [ + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => true, + ], + 'forgotten_password_time' => [ + 'type' => 'INT', + 'constraint' => '11', + 'unsigned' => true, + 'null' => true, + ], + 'remember_selector' => [ + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => true, + 'unique' => true, + ], + 'remember_code' => [ + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => true, + ], + 'created_on' => [ + 'type' => 'INT', + 'constraint' => '11', + 'unsigned' => true, + ], + 'last_login' => [ + 'type' => 'INT', + 'constraint' => '11', + 'unsigned' => true, + 'null' => true, + ], + 'active' => [ + 'type' => 'TINYINT', + 'constraint' => '1', + 'unsigned' => true, + 'null' => true, + ], + 'first_name' => [ + 'type' => 'VARCHAR', + 'constraint' => '50', + 'null' => true, + ], + 'last_name' => [ + 'type' => 'VARCHAR', + 'constraint' => '50', + 'null' => true, + ], + 'company' => [ + 'type' => 'VARCHAR', + 'constraint' => '100', + 'null' => true, + ], + 'phone' => [ + 'type' => 'VARCHAR', + 'constraint' => '20', + 'null' => true, + ], + ]); + $this->forge->addKey('id', true); + $this->forge->createTable($this->tables['users']); + + // Dumping data for table 'users' + $data = [ + 'ip_address' => '127.0.0.1', + 'username' => 'administrator', + 'password' => '$2y$08$200Z6ZZbp3RAEXoaWcMA6uJOFicwNZaqk4oDhqTUiFXFe63MG.Daa', + 'email' => 'admin@admin.com', + 'activation_code' => '', + 'forgotten_password_code' => null, + 'created_on' => '1268889823', + 'last_login' => '1268889823', + 'active' => '1', + 'first_name' => 'Admin', + 'last_name' => 'istrator', + 'company' => 'ADMIN', + 'phone' => '0', + ]; + $this->db->table($this->tables['users'])->insert($data); + + // Drop table 'users_groups' if it exists + $this->forge->dropTable($this->tables['users_groups'], true); + + // Table structure for table 'users_groups' + $this->forge->addField([ + 'id' => [ + 'type' => 'MEDIUMINT', + 'constraint' => '8', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'user_id' => [ + 'type' => 'MEDIUMINT', + 'constraint' => '8', + 'unsigned' => true, + ], + 'group_id' => [ + 'type' => 'MEDIUMINT', + 'constraint' => '8', + 'unsigned' => true, + ], + ]); + $this->forge->addKey('id', true); + $this->forge->createTable($this->tables['users_groups']); + + // Dumping data for table 'users_groups' + $data = [ + [ + 'user_id' => '1', + 'group_id' => '1', + ], + [ + 'user_id' => '1', + 'group_id' => '2', + ], + ]; + $this->db->table($this->tables['users_groups'])->insertBatch($data); + + // Drop table 'login_attempts' if it exists + $this->forge->dropTable($this->tables['login_attempts'], true); + + // Table structure for table 'login_attempts' + $this->forge->addField([ + 'id' => [ + 'type' => 'MEDIUMINT', + 'constraint' => '8', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'ip_address' => [ + 'type' => 'VARCHAR', + 'constraint' => '45', + ], + 'login' => [ + 'type' => 'VARCHAR', + 'constraint' => '100', + 'null' => true, + ], + 'time' => [ + 'type' => 'INT', + 'constraint' => '11', + 'unsigned' => true, + 'null' => true, + ] + ]); + $this->forge->addKey('id', true); + $this->forge->createTable($this->tables['login_attempts']); + } + + /** + * Down + * + * @return void + */ + public function down() + { + $this->forge->dropTable($this->tables['users'], true); + $this->forge->dropTable($this->tables['groups'], true); + $this->forge->dropTable($this->tables['users_groups'], true); + $this->forge->dropTable($this->tables['login_attempts'], true); + } +} diff --git a/migrations/001_install_ion_auth.php b/Database/Migrations/20181211100537_install_ion_auth.php similarity index 54% rename from migrations/001_install_ion_auth.php rename to Database/Migrations/20181211100537_install_ion_auth.php index d6a355ef0..dd793b9d9 100644 --- a/migrations/001_install_ion_auth.php +++ b/Database/Migrations/20181211100537_install_ion_auth.php @@ -1,27 +1,63 @@ - + * @license https://opensource.org/licenses/MIT MIT License + * @link http://github.com/benedmunds/CodeIgniter-Ion-Auth + */ + +/** + * Migration class + * + * @package CodeIgniter-Ion-Auth + */ +class Migration_Install_ion_auth extends \CodeIgniter\Database\Migration +{ + /** + * Tables + * + * @var array + */ private $tables; - public function __construct() { + /** + * Construct + * + * @return void + */ + public function __construct() + { + $config = config('IonAuth'); + + // initialize the database + $this->DBGroup = empty($config->databaseGroupName) ? '' : $config->databaseGroupName; + parent::__construct(); - $this->load->dbforge(); - $this->load->config('ion_auth', TRUE); - $this->tables = $this->config->item('tables', 'ion_auth'); + $this->tables = $config->tables; } - public function up() { + /** + * Up + * + * @return void + */ + public function up() + { // Drop table 'groups' if it exists - $this->dbforge->drop_table($this->tables['groups'], TRUE); + $this->forge->dropTable($this->tables['groups'], true); // Table structure for table 'groups' - $this->dbforge->add_field([ + $this->forge->addField([ 'id' => [ 'type' => 'MEDIUMINT', 'constraint' => '8', - 'unsigned' => TRUE, - 'auto_increment' => TRUE + 'unsigned' => true, + 'auto_increment' => true, ], 'name' => [ 'type' => 'VARCHAR', @@ -30,38 +66,38 @@ public function up() { 'description' => [ 'type' => 'VARCHAR', 'constraint' => '100', - ] + ], ]); - $this->dbforge->add_key('id', TRUE); - $this->dbforge->create_table($this->tables['groups']); + $this->forge->addKey('id', true); + $this->forge->createTable($this->tables['groups']); // Dumping data for table 'groups' $data = [ [ 'name' => 'admin', - 'description' => 'Administrator' + 'description' => 'Administrator', ], [ 'name' => 'members', - 'description' => 'General User' - ] + 'description' => 'General User', + ], ]; - $this->db->insert_batch($this->tables['groups'], $data); + $this->db->table($this->tables['groups'])->insertBatch($data); // Drop table 'users' if it exists - $this->dbforge->drop_table($this->tables['users'], TRUE); + $this->forge->dropTable($this->tables['users'], true); // Table structure for table 'users' - $this->dbforge->add_field([ + $this->forge->addField([ 'id' => [ 'type' => 'MEDIUMINT', 'constraint' => '8', - 'unsigned' => TRUE, - 'auto_increment' => TRUE + 'unsigned' => true, + 'auto_increment' => true, ], 'ip_address' => [ 'type' => 'VARCHAR', - 'constraint' => '45' + 'constraint' => '45', ], 'username' => [ 'type' => 'VARCHAR', @@ -74,87 +110,87 @@ public function up() { 'email' => [ 'type' => 'VARCHAR', 'constraint' => '254', - 'unique' => TRUE + 'unique' => true, ], 'activation_selector' => [ 'type' => 'VARCHAR', 'constraint' => '255', - 'null' => TRUE, - 'unique' => TRUE + 'null' => true, + 'unique' => true, ], 'activation_code' => [ 'type' => 'VARCHAR', 'constraint' => '255', - 'null' => TRUE + 'null' => true, ], 'forgotten_password_selector' => [ 'type' => 'VARCHAR', 'constraint' => '255', - 'null' => TRUE, - 'unique' => TRUE + 'null' => true, + 'unique' => true, ], 'forgotten_password_code' => [ 'type' => 'VARCHAR', 'constraint' => '255', - 'null' => TRUE + 'null' => true, ], 'forgotten_password_time' => [ 'type' => 'INT', 'constraint' => '11', - 'unsigned' => TRUE, - 'null' => TRUE + 'unsigned' => true, + 'null' => true, ], 'remember_selector' => [ 'type' => 'VARCHAR', 'constraint' => '255', - 'null' => TRUE, - 'unique' => TRUE + 'null' => true, + 'unique' => true, ], 'remember_code' => [ 'type' => 'VARCHAR', 'constraint' => '255', - 'null' => TRUE + 'null' => true, ], 'created_on' => [ 'type' => 'INT', 'constraint' => '11', - 'unsigned' => TRUE, + 'unsigned' => true, ], 'last_login' => [ 'type' => 'INT', 'constraint' => '11', - 'unsigned' => TRUE, - 'null' => TRUE + 'unsigned' => true, + 'null' => true, ], 'active' => [ 'type' => 'TINYINT', 'constraint' => '1', - 'unsigned' => TRUE, - 'null' => TRUE + 'unsigned' => true, + 'null' => true, ], 'first_name' => [ 'type' => 'VARCHAR', 'constraint' => '50', - 'null' => TRUE + 'null' => true, ], 'last_name' => [ 'type' => 'VARCHAR', 'constraint' => '50', - 'null' => TRUE + 'null' => true, ], 'company' => [ 'type' => 'VARCHAR', 'constraint' => '100', - 'null' => TRUE + 'null' => true, ], 'phone' => [ 'type' => 'VARCHAR', 'constraint' => '20', - 'null' => TRUE - ] + 'null' => true, + ], ]); - $this->dbforge->add_key('id', TRUE); - $this->dbforge->create_table($this->tables['users']); + $this->forge->addKey('id', true); + $this->forge->createTable($this->tables['users']); // Dumping data for table 'users' $data = [ @@ -163,7 +199,7 @@ public function up() { 'password' => '$2y$08$200Z6ZZbp3RAEXoaWcMA6uJOFicwNZaqk4oDhqTUiFXFe63MG.Daa', 'email' => 'admin@admin.com', 'activation_code' => '', - 'forgotten_password_code' => NULL, + 'forgotten_password_code' => null, 'created_on' => '1268889823', 'last_login' => '1268889823', 'active' => '1', @@ -172,33 +208,32 @@ public function up() { 'company' => 'ADMIN', 'phone' => '0', ]; - $this->db->insert($this->tables['users'], $data); - + $this->db->table($this->tables['users'])->insert($data); // Drop table 'users_groups' if it exists - $this->dbforge->drop_table($this->tables['users_groups'], TRUE); + $this->forge->dropTable($this->tables['users_groups'], true); // Table structure for table 'users_groups' - $this->dbforge->add_field([ + $this->forge->addField([ 'id' => [ 'type' => 'MEDIUMINT', 'constraint' => '8', - 'unsigned' => TRUE, - 'auto_increment' => TRUE + 'unsigned' => true, + 'auto_increment' => true, ], 'user_id' => [ 'type' => 'MEDIUMINT', 'constraint' => '8', - 'unsigned' => TRUE + 'unsigned' => true, ], 'group_id' => [ 'type' => 'MEDIUMINT', 'constraint' => '8', - 'unsigned' => TRUE - ] + 'unsigned' => true, + ], ]); - $this->dbforge->add_key('id', TRUE); - $this->dbforge->create_table($this->tables['users_groups']); + $this->forge->addKey('id', true); + $this->forge->createTable($this->tables['users_groups']); // Dumping data for table 'users_groups' $data = [ @@ -209,47 +244,51 @@ public function up() { [ 'user_id' => '1', 'group_id' => '2', - ] + ], ]; - $this->db->insert_batch($this->tables['users_groups'], $data); - + $this->db->table($this->tables['users_groups'])->insertBatch($data); // Drop table 'login_attempts' if it exists - $this->dbforge->drop_table($this->tables['login_attempts'], TRUE); + $this->forge->dropTable($this->tables['login_attempts'], true); // Table structure for table 'login_attempts' - $this->dbforge->add_field([ + $this->forge->addField([ 'id' => [ 'type' => 'MEDIUMINT', 'constraint' => '8', - 'unsigned' => TRUE, - 'auto_increment' => TRUE + 'unsigned' => true, + 'auto_increment' => true, ], 'ip_address' => [ 'type' => 'VARCHAR', - 'constraint' => '45' + 'constraint' => '45', ], 'login' => [ 'type' => 'VARCHAR', 'constraint' => '100', - 'null' => TRUE + 'null' => true, ], 'time' => [ 'type' => 'INT', 'constraint' => '11', - 'unsigned' => TRUE, - 'null' => TRUE + 'unsigned' => true, + 'null' => true, ] ]); - $this->dbforge->add_key('id', TRUE); - $this->dbforge->create_table($this->tables['login_attempts']); - + $this->forge->addKey('id', true); + $this->forge->createTable($this->tables['login_attempts']); } - public function down() { - $this->dbforge->drop_table($this->tables['users'], TRUE); - $this->dbforge->drop_table($this->tables['groups'], TRUE); - $this->dbforge->drop_table($this->tables['users_groups'], TRUE); - $this->dbforge->drop_table($this->tables['login_attempts'], TRUE); + /** + * Down + * + * @return void + */ + public function down() + { + $this->forge->dropTable($this->tables['users'], true); + $this->forge->dropTable($this->tables['groups'], true); + $this->forge->dropTable($this->tables['users_groups'], true); + $this->forge->dropTable($this->tables['login_attempts'], true); } } diff --git a/INSTALLING.md b/INSTALLING.md index 529baf15c..e2077a1aa 100644 --- a/INSTALLING.md +++ b/INSTALLING.md @@ -3,61 +3,68 @@ Installing Ion Auth. Before installing, please check that you are meeting the minimum server requirements. -There are 2 ways to install this package. +There are different ways to install this package. -> 1. Move files from this package to the corresponding folder structure: + +> 1. With composer ```shell -CI # → Root Directory -└── application/ - ├── config/ - │ └── ion_auth.php - ├── controllers/ - │ └── Auth.php - ├── libraries - │ └── Ion_auth.php - ├── models - │ └── Ion_auth_model.php - └── views/ - └── auth/ # → Various view files +$ composer require https://github.com/benedmunds/CodeIgniter-Ion-Auth:dev-4 ``` - --- - -> 2. Move files from this package to the corresponding **third_party** structure: +> 2. With Git: ```shell -CI # → Root Directory -└── application/ - ├── controllers/ - │ └── Auth.php - ├── third_party/ - │ └── ion_auth/ - │ ├── config/ - │ │ └── ion_auth.php - │ ├── libraries - │ │ └── Ion_auth.php - │ └── models - │ └── Ion_auth_model.php - └── views/ - └── auth/ # → Various view files +my-project$ git clone https://github.com/benedmunds/CodeIgniter-Ion-Auth.git +my-project$ cd CodeIgniter-Ion-Auth +CodeIgniter-Ion-Auth$ git checkout 4 +``` +Then in your Config/Autoload.php, add this : +```php +'IonAuth' => ROOTPATH . 'CodeIgniter-Ion-Auth', ``` -Then in your controller, example `Auth.php` add the package path and load the library like normal +--- - $this->load->add_package_path(APPPATH.'third_party/ion_auth/'); - $this->load->library('ion_auth’); +> 3. Download the archive, and move folder from this package to the root folder: -Or autoload by adding the following to application/config/autoload.php +```shell +CI # → Root Directory +├── application/ +├── ion-auth/ # → Ion-auth directory +├── public +├──... +``` +Then in your Config/Autoload.php, add this : +```php +'IonAuth' => ROOTPATH . 'YOUR-ION_AUTH-FOLDER', +``` - $autoload['packages'] = array(APPPATH.'third_party/ion_auth'); +--- +### Relational DB Setup +Then use the migration file (in Database/Migrations/). +``` +$ php spark migrate:latest -n IonAuth +``` +Don't forget to set Config\Migrations:enabled to true. --- -### Relational DB Setup -Then just run the appropriate SQL file (if you're using migrations you can -get the migrations from JD here: -https://github.com/iamfiscus/codeigniter-ion-auth-migration). +### Use it +The most convenient way is to create a new controller like this : +```php + 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Please login with your email/username and password below.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Remember Me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Forgot your password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Below is a list of the users.', + 'index_fname_th' => 'First Name', + 'index_lname_th' => 'Last Name', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groups', + 'index_status_th' => 'Status', + 'index_action_th' => 'Action', + 'index_active_link' => 'Active', + 'index_inactive_link' => 'Inactive', + 'index_create_user_link' => 'Create a new user', + 'index_create_group_link' => 'Create a new group', + + // Deactivate User + 'deactivate_heading' => 'Deactivate User', + 'deactivate_subheading' => 'Are you sure you want to deactivate the user \'%s\'', + 'deactivate_confirm_y_label' => 'Yes:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Submit', + 'deactivate_validation_confirm_label' => 'confirmation', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Create User', + 'create_user_subheading' => 'Please enter the users information below.', + 'create_user_fname_label' => 'First Name:', + 'create_user_lname_label' => 'Last Name:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Company Name:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Phone:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Confirm Password:', + 'create_user_submit_btn' => 'Create User', + 'create_user_validation_fname_label' => 'First Name', + 'create_user_validation_lname_label' => 'Last Name', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Company Name', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the users information below.', + 'edit_user_fname_label' => 'First Name:', + 'edit_user_lname_label' => 'Last Name:', + 'edit_user_company_label' => 'Company Name:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Password: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Password: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'First Name', + 'edit_user_validation_lname_label' => 'Last Name', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Phone', + 'edit_user_validation_company_label' => 'Company Name', + 'edit_user_validation_groups_label' => 'Groups', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Create Group + 'create_group_title' => 'Create Group', + 'create_group_heading' => 'Create Group', + 'create_group_subheading' => 'Please enter the group information below.', + 'create_group_name_label' => 'Group Name:', + 'create_group_desc_label' => 'Description:', + 'create_group_submit_btn' => 'Create Group', + 'create_group_validation_name_label' => 'Group Name', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Edit Group', + 'edit_group_saved' => 'Group Saved', + 'edit_group_heading' => 'Edit Group', + 'edit_group_subheading' => 'Please enter the group information below.', + 'edit_group_name_label' => 'Group Name:', + 'edit_group_desc_label' => 'Description:', + 'edit_group_submit_btn' => 'Save Group', + 'edit_group_validation_name_label' => 'Group Name', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Change Password', + 'change_password_old_password_label' => 'Old Password:', + 'change_password_new_password_label' => 'New Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'Confirm New Password:', + 'change_password_submit_btn' => 'Change', + 'change_password_validation_old_password_label' => 'Old Password', + 'change_password_validation_new_password_label' => 'New Password', + 'change_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Please enter your %s so we can send you an email to reset your password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_username_identity_label' => 'Username', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Change Password', + 'reset_password_new_password_label' => 'New Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'Confirm New Password:', + 'reset_password_submit_btn' => 'Change', + 'reset_password_validation_new_password_label' => 'New Password', + 'reset_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/ar/IonAuth.php b/Language/ar/IonAuth.php new file mode 100644 index 000000000..bd30bcaf8 --- /dev/null +++ b/Language/ar/IonAuth.php @@ -0,0 +1,73 @@ + 'تم انشاء حسابك بنجاح', + 'account_creation_unsuccessful' => 'حدث خطأ اثناء انشاء حسابك لدينا', + 'account_creation_duplicate_email' => 'هذا البريد الإلكترونى تم استخدامه من قبل او غير صحيح', + 'account_creation_duplicate_identity' => 'اسم المستخدم تم التسجيل به من قبل او غير صحيح', + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + // Password + 'password_change_successful' => 'تم تغيير كلمة السر', + 'password_change_unsuccessful' => 'لا يمكن تغيير كلمة السر', + 'forgot_password_successful' => 'تم ارسال بريد لإستعادة كلمة السر', + 'forgot_password_unsuccessful' => 'لا يمكن استعادة كلمة السر', + + // Activation + 'activate_successful' => 'تم تفعيل حسابك', + 'activate_unsuccessful' => 'لا يمكن تفعيل حسابك', + 'deactivate_successful' => 'تم إيقاف حسابك', + 'deactivate_unsuccessful' => 'لا يمكن إيقاف حسابك', + 'activation_email_successful' => 'تم إرسال بريد التفعيل', + 'activation_email_unsuccessful' => 'لا يمكن ارسال بريد التفعيل', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'تم تسجيل الدخول بنجاح', + 'login_unsuccessful' => 'معلومات الدخول غير صحيحة', + 'login_unsuccessful_not_active'=> 'Account is inactive', + 'login_timeout' => 'Temporarily Locked Out. Try again later.', + 'logout_successful' => 'تم تسجيل خروجك', + + // Account Changes + 'update_successful' => 'تم تعديل معلومات حسابك', + 'update_unsuccessful' => 'لا يمكن تعديل معلومات الحساب', + 'delete_successful' => 'تم إلغاء المستخدم', + 'delete_unsuccessful' => 'لا يمكن إلغاء المستخدم', + + // Groups + 'group_creation_successful' => 'Group created Successfully', + 'group_already_exists' => 'Group name already taken', + 'group_update_successful' => 'Group details updated', + 'group_delete_successful' => 'Group deleted', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Account Activation', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Please click this link to %s.', + 'emailActivate_link' => 'Activate Your Account', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Forgotten Password Verification', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', + ]; diff --git a/Language/bg/Auth.php b/Language/bg/Auth.php new file mode 100644 index 000000000..66985fefc --- /dev/null +++ b/Language/bg/Auth.php @@ -0,0 +1,152 @@ + 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Please login with your email/username and password below.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Remember Me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Forgot your password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Below is a list of the users.', + 'index_fname_th' => 'First Name', + 'index_lname_th' => 'Last Name', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groups', + 'index_status_th' => 'Status', + 'index_action_th' => 'Action', + 'index_active_link' => 'Active', + 'index_inactive_link' => 'Inactive', + 'index_create_user_link' => 'Create a new user', + 'index_create_group_link' => 'Create a new group', + + // Deactivate User + 'deactivate_heading' => 'Deactivate User', + 'deactivate_subheading' => 'Are you sure you want to deactivate the user \'%s\'', + 'deactivate_confirm_y_label' => 'Yes:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Submit', + 'deactivate_validation_confirm_label' => 'confirmation', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Create User', + 'create_user_subheading' => 'Please enter the users information below.', + 'create_user_fname_label' => 'First Name:', + 'create_user_lname_label' => 'Last Name:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Company Name:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Phone:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Confirm Password:', + 'create_user_submit_btn' => 'Create User', + 'create_user_validation_fname_label' => 'First Name', + 'create_user_validation_lname_label' => 'Last Name', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Company Name', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the users information below.', + 'edit_user_fname_label' => 'First Name:', + 'edit_user_lname_label' => 'Last Name:', + 'edit_user_company_label' => 'Company Name:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Password: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Password: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'First Name', + 'edit_user_validation_lname_label' => 'Last Name', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Phone', + 'edit_user_validation_company_label' => 'Company Name', + 'edit_user_validation_groups_label' => 'Groups', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Create Group + 'create_group_title' => 'Create Group', + 'create_group_heading' => 'Create Group', + 'create_group_subheading' => 'Please enter the group information below.', + 'create_group_name_label' => 'Group Name:', + 'create_group_desc_label' => 'Description:', + 'create_group_submit_btn' => 'Create Group', + 'create_group_validation_name_label' => 'Group Name', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Edit Group', + 'edit_group_saved' => 'Group Saved', + 'edit_group_heading' => 'Edit Group', + 'edit_group_subheading' => 'Please enter the group information below.', + 'edit_group_name_label' => 'Group Name:', + 'edit_group_desc_label' => 'Description:', + 'edit_group_submit_btn' => 'Save Group', + 'edit_group_validation_name_label' => 'Group Name', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Change Password', + 'change_password_old_password_label' => 'Old Password:', + 'change_password_new_password_label' => 'New Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'Confirm New Password:', + 'change_password_submit_btn' => 'Change', + 'change_password_validation_old_password_label' => 'Old Password', + 'change_password_validation_new_password_label' => 'New Password', + 'change_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Please enter your %s so we can send you an email to reset your password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_username_identity_label' => 'Username', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Change Password', + 'reset_password_new_password_label' => 'New Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'Confirm New Password:', + 'reset_password_submit_btn' => 'Change', + 'reset_password_validation_new_password_label' => 'New Password', + 'reset_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/bg/IonAuth.php b/Language/bg/IonAuth.php new file mode 100644 index 000000000..2b6d34ec1 --- /dev/null +++ b/Language/bg/IonAuth.php @@ -0,0 +1,78 @@ + 'Регистрацията бе създадена успешно', + 'account_creation_unsuccessful' => 'Неуспешен опит за създаване на регистрация', + 'account_creation_duplicate_email' => 'Email адреса е вече използван или невалиден', + 'account_creation_duplicate_identity' => 'Потребителското име е вече използвано или невалидно', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + // Password + 'password_change_successful' => 'Паролата бе сменена успешно', + 'password_change_unsuccessful' => 'Неуспешен опит за смяна на паролата', + 'forgot_password_successful' => 'Изпратен е Email за нулиране на паролата', + 'forgot_password_unsuccessful' => 'Неуспешен опит за нулиране на паролата', + + // Activation + 'activate_successful' => 'Регистрацията е активирана', + 'activate_unsuccessful' => 'Неуспешен опит за активиране на регистрацията', + 'deactivate_successful' => 'Регистрацията е деактивирана', + 'deactivate_unsuccessful' => 'Неуспешен опит за деактивиране на регистрацията', + 'activation_email_successful' => 'Изпратен е Email за активиране на регистрацията', + 'activation_email_unsuccessful' => 'Неуспешен опит за изпращане на Email за активация', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Успешен вход в системата', + 'login_unsuccessful' => 'Неуспешен вход в системата', + 'login_unsuccessful_not_active' => 'Регистрацията не е активирана', + 'login_timeout' => 'Временно заключен. Моля опитайте по-късно', + 'logout_successful' => 'Успешен изход от системата', + + // Account Changes + 'update_successful' => 'Регистрацията беше актуализирана успешно', + 'update_unsuccessful' => 'Неуспешен опит за актуализиране на регистрацията', + 'delete_successful' => 'Потребителя бе изтрит', + 'delete_unsuccessful' => 'Неуспешен опит за изтриване на потребител', + + // Groups + 'group_creation_successful' => 'Групата бе създадена успешно', + 'group_already_exists' => 'Името на групата вече е заето', + 'group_update_successful' => 'Детайлите на групата бяха актуализирани', + 'group_delete_successful' => 'Групата бе изтрита', + 'group_delete_unsuccessful' => 'Неуспешен опит за изтриване на групата', + //TO DO Please translate + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + //TO DO Please translate + // Activation Email + 'emailActivation_subject' => 'Активиране на регистрацията', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Please click this link to %s.', + 'emailActivate_link' => 'Activate Your Account', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Проверка за забравена парола', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/bn/Auth.php b/Language/bn/Auth.php new file mode 100644 index 000000000..cf92eb93b --- /dev/null +++ b/Language/bn/Auth.php @@ -0,0 +1,274 @@ + 'এই ফর্মের ডাটা নিরাপদ নহে, এটি আমাদের নিরাপত্তা সংক্রান্ত শর্তগুলো পূরণ করতে পারেনি।', + + // Login + 'login_heading' => 'প্রবেশ করুন', + 'login_subheading' => 'দয়াকরে আপনার ইমেইল / ব্যবহারকারী নাম এবং পাসওয়ার্ড দিয়ে লগইন করুন।', + 'login_identity_label' => 'ইমেইল/ব্যবহারকারী নাম ঃ', + 'login_password_label' => 'পাসওয়ার্ড ঃ', + 'login_remember_label' => 'মনে রাখবেন', + 'login_submit_btn' => 'লগইন', + 'login_forgot_password' => 'আপনি কি পাসওয়ার্ড ভুলে গেছেন?', + + // Index + 'index_heading' => 'ব্যবহারকারীগন', + 'index_subheading' => 'নীচে ব্যবহারকারীদের তালিকা।', + 'index_fname_th' => 'নামের প্রথম অংশ', + 'index_lname_th' => 'নামের দ্বিতীয় অংশ', + 'index_email_th' => 'ই-মেইল', + 'index_groups_th' => 'গ্রূপ/দল', + 'index_status_th' => 'অ্যাকাউন্টের অবস্থা', + 'index_action_th' => 'কার্য', + 'index_active_link' => 'সক্রিয়', + 'index_inactive_link' => 'নিষ্ক্রিয়', + 'index_create_user_link' => 'একটি নতুন ব্যবহারকারী তৈরি করুন', + 'index_create_group_link' => 'একটি নতুন গ্রূপ/দল তৈরি করুন', + + // Deactivate User + 'deactivate_heading' => 'ব্যবহারকারী নিষ্ক্রিয়করন', + 'deactivate_subheading' => '\'%s\' এই ব্যবহারকারীকে আপনি কি আসলেই নিষ্ক্রিয় করতে চান', + 'deactivate_confirm_y_label' => 'হাঁ', + 'deactivate_confirm_n_label' => 'না', + 'deactivate_submit_btn' => 'সম্পূর্ণ করুন', + 'deactivate_validation_confirm_label' => 'অনুমোদন', + 'deactivate_validation_user_id_label' => 'ব্যবহারকারীর ক্রমিক নং', + + // Create User + 'create_user_heading' => 'নতুন ব্যবহারকারী তৈরি প্রক্রিয়া', + 'create_user_subheading' => 'দয়া করে নীচে ব্যবহারকারী সংক্রান্ত তথ্য গুলি পূরণ করুন।', + 'create_user_fname_label' => 'নামের প্রথম অংশঃ', + 'create_user_lname_label' => 'নামের দ্বিতীয় অংশঃ', + 'create_user_company_label' => 'কম্পানির নামঃ', + 'create_user_identity_label' => 'আইডেন্টিটিঃ', + 'create_user_email_label' => 'ই-মেইলঃ', + 'create_user_phone_label' => 'টেলিফোনঃ', + 'create_user_password_label' => 'পাসওয়ার্ডঃ', + 'create_user_password_confirm_label' => 'পুনরায় পাসওয়ার্ডটি দিনঃ', + 'create_user_submit_btn' => 'ব্যবহারকারী তৈরি করুন', + 'create_user_validation_fname_label' => 'নামের প্রথম অংশ', + 'create_user_validation_lname_label' => 'নামের দ্বিতীয় অংশ', + 'create_user_validation_identity_label' => 'আইডেন্টিটি', + 'create_user_validation_email_label' => 'ই-মেইল', + 'create_user_validation_phone_label' => 'টেলিফোন', + 'create_user_validation_company_label' => 'কোম্পানি নাম', + 'create_user_validation_password_label' => 'পাসওয়ার্ড', + 'create_user_validation_password_confirm_label' => 'পুন: পাসওয়ার্ড', + + // Edit User + 'edit_user_heading' => 'ব্যবহারকারীর তথ্য হালনাগাদ করুন', + 'edit_user_subheading' => 'দয়া করে ব্যবহারকারীর নিম্নের তথ্যগুলো সম্পূর্ণ করুন।', + 'edit_user_fname_label' => 'নামের প্রথম অংশঃ', + 'edit_user_lname_label' => 'নামের দ্বিতীয় অংশঃ', + 'edit_user_company_label' => 'কম্পানির নামঃ', + 'edit_user_email_label' => 'ই-মেইলঃ', + 'edit_user_phone_label' => 'টেলিফোনঃ', + 'edit_user_password_label' => 'পাসওয়ার্ডঃ (যদি পরিবর্তন করতে চান)', + 'edit_user_password_confirm_label' => 'পুনরায় পাসওয়ার্ডটি দিনঃ (যদি পরিবর্তন করতে চান)', + 'edit_user_groups_heading' => 'কোন দল/শ্রেণীর সদস্য', + 'edit_user_submit_btn' => 'সংরক্ষণ করুন', + 'edit_user_validation_fname_label' => 'নামের প্রথম অংশ', + 'edit_user_validation_lname_label' => 'নামের দ্বিতীয় অংশ', + 'edit_user_validation_email_label' => 'ই-মেইল', + 'edit_user_validation_phone_label' => 'টেলিফোন', + 'edit_user_validation_company_label' => 'কম্পানির নাম', + 'edit_user_validation_groups_label' => 'দল/শ্রেণীর', + 'edit_user_validation_password_label' => 'পাসওয়ার্ড', + 'edit_user_validation_password_confirm_label' => 'পুনরায় পাসওয়ার্ডটি দিন', + + // Create Group + 'create_group_title' => 'নুতুন দল/শ্রেণী তৈরি', + 'create_group_heading' => 'নুতুন দল/শ্রেণী তৈরি', + 'create_group_subheading' => 'দয়া করে নিচের দল সম্পর্কিত তথ্যগুলি সম্পূর্ণ করুন।', + 'create_group_name_label' => 'দলের নামঃ', + 'create_group_desc_label' => 'বর্ণনাঃ', + 'create_group_submit_btn' => 'দল তৈরি করুন', + 'create_group_validation_name_label' => 'দলের নাম', + 'create_group_validation_desc_label' => 'বর্ণনা', + + // Edit Group + 'edit_group_title' => 'দল/শ্রেণীর তথ্য হালনাগাদ করুন', + 'edit_group_saved' => 'তথ্য সংরক্ষিত হয়েছে', + 'edit_group_heading' => 'দল/শ্রেণীর তথ্য হালনাগাদ করুন', + 'edit_group_subheading' => 'দয়া করে নিচের দল সম্পর্কিত তথ্যগুলি সম্পূর্ণ করুন।', + 'edit_group_name_label' => 'দলের নামঃ', + 'edit_group_desc_label' => 'বর্ণনাঃ', + 'edit_group_submit_btn' => 'সংরক্ষণ করুন', + 'edit_group_validation_name_label' => 'দলের নাম', + 'edit_group_validation_desc_label' => 'বর্ণনা', + + // Change Password + 'edit_user_validation_password_label' => 'পাসওয়ার্ড পরিবর্তন', + 'change_password_heading' => '', + 'change_password_old_password_label' => 'পুরাতন পাসওয়ার্ডঃ', + 'change_password_new_password_label' => 'নুতুন পাসওয়ার্ড (অন্যূন %s অক্ষরের হতে হবে)ঃ', + 'change_password_new_password_confirm_label' => 'নুতুন পাসওয়ার্ডটি আবার দিনঃ', + 'change_password_submit_btn' => 'পরিবর্তন করুন', + 'change_password_validation_old_password_label' => 'পুরাতন পাসওয়ার্ড', + 'change_password_validation_new_password_label' => 'নুতুন পাসওয়ার্ড', + 'change_password_validation_new_password_confirm_label' => 'নুতুন পাসওয়ার্ডটি আবার দিন', + + // Forgot Password + 'forgot_password_heading' => 'ভুলেযাওয়া পাসওয়ার্ড', + 'forgot_password_subheading' => 'দয়া করে আপনার %s দিন যাতে আমরা আপনার পাসওয়ার্ড পুনরায় সেট করতে একটি ইমেল পাঠাতে পারি।', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'সম্পূর্ণ করুন', + 'forgot_password_validation_email_label' => 'ই-মেইল', + 'forgot_password_identity_label' => 'আইডেন্টিটি', + 'forgot_password_email_identity_label' => 'ই-মেইল', + 'forgot_password_email_not_found' => 'আপনার এই ই-মেইল আমাদের সাথে যুক্ত নেই।', + 'forgot_password_identity_not_found' => 'আপনার এই নামটি আমাদের সাথে যুক্ত নেই।', + + // Reset Password + 'reset_password_heading' => 'পাসওয়ার্ড পরিবর্তন', + 'reset_password_new_password_label' => 'নুতুন পাসওয়ার্ড (অন্যূন %s অক্ষরের হতে হবে)ঃ', + 'reset_password_new_password_confirm_label' => 'নুতুন পাসওয়ার্ডটি আবার দিনঃ', + 'reset_password_submit_btn' => 'পরিবর্তন করুন', + 'reset_password_validation_new_password_label' => 'নুতুন পাসওয়ার্ড', + 'reset_password_validation_new_password_confirm_label' => 'নুতুন পাসওয়ার্ডটি আবার দিন', + 'error_security' => 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Please login with your email/username and password below.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Remember Me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Forgot your password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Below is a list of the users.', + 'index_fname_th' => 'First Name', + 'index_lname_th' => 'Last Name', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groups', + 'index_status_th' => 'Status', + 'index_action_th' => 'Action', + 'index_active_link' => 'Active', + 'index_inactive_link' => 'Inactive', + 'index_create_user_link' => 'Create a new user', + 'index_create_group_link' => 'Create a new group', + + // Deactivate User + 'deactivate_heading' => 'Deactivate User', + 'deactivate_subheading' => 'Are you sure you want to deactivate the user \'%s\'', + 'deactivate_confirm_y_label' => 'Yes:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Submit', + 'deactivate_validation_confirm_label' => 'confirmation', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Create User', + 'create_user_subheading' => 'Please enter the user\'s information below.', + 'create_user_fname_label' => 'First Name:', + 'create_user_lname_label' => 'Last Name:', + 'create_user_company_label' => 'Company Name:', + 'create_user_identity_label' => 'Identity:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Phone:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Confirm Password:', + 'create_user_submit_btn' => 'Create User', + 'create_user_validation_fname_label' => 'First Name', + 'create_user_validation_lname_label' => 'Last Name', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Company Name', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the user\'s information below.', + 'edit_user_fname_label' => 'First Name:', + 'edit_user_lname_label' => 'Last Name:', + 'edit_user_company_label' => 'Company Name:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Password: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Password: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'First Name', + 'edit_user_validation_lname_label' => 'Last Name', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Phone', + 'edit_user_validation_company_label' => 'Company Name', + 'edit_user_validation_groups_label' => 'Groups', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Create Group + 'create_group_title' => 'Create Group', + 'create_group_heading' => 'Create Group', + 'create_group_subheading' => 'Please enter the group information below.', + 'create_group_name_label' => 'Group Name:', + 'create_group_desc_label' => 'Description:', + 'create_group_submit_btn' => 'Create Group', + 'create_group_validation_name_label' => 'Group Name', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Edit Group', + 'edit_group_saved' => 'Group Saved', + 'edit_group_heading' => 'Edit Group', + 'edit_group_subheading' => 'Please enter the group information below.', + 'edit_group_name_label' => 'Group Name:', + 'edit_group_desc_label' => 'Description:', + 'edit_group_submit_btn' => 'Save Group', + 'edit_group_validation_name_label' => 'Group Name', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Change Password', + 'change_password_old_password_label' => 'Old Password:', + 'change_password_new_password_label' => 'New Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'Confirm New Password:', + 'change_password_submit_btn' => 'Change', + 'change_password_validation_old_password_label' => 'Old Password', + 'change_password_validation_new_password_label' => 'New Password', + 'change_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Please enter your %s so we can send you an email to reset your password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_identity_label' => 'Identity', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username.', + + // Reset Password + 'reset_password_heading' => 'Change Password', + 'reset_password_new_password_label' => 'New Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'Confirm New Password:', + 'reset_password_submit_btn' => 'Change', + 'reset_password_validation_new_password_label' => 'New Password', + 'reset_password_validation_new_password_confirm_label' => 'Confirm New Password', +]; diff --git a/Language/bn/IonAuth.php b/Language/bn/IonAuth.php new file mode 100644 index 000000000..0345adcd0 --- /dev/null +++ b/Language/bn/IonAuth.php @@ -0,0 +1,87 @@ + 'অ্যাকাউন্টটি সফলভাবে তৈরি হয়েছে', + 'account_creation_unsuccessful' => 'অ্যাকাউন্টটি তৈরি করা যাচ্ছেনা', + 'account_creation_duplicate_email' => 'ইমেলটি ইতিমধ্যে ব্যবহৃত হয়েছে অথবা এটি ভুল', + 'account_creation_duplicate_identity' => 'এটি ইতিমধ্যে ব্যবহৃত হয়েছে অথবা ভুল', + 'account_creation_missing_defaultGroup' => 'পূর্বনির্ধারিত গ্রুপ সেট করা হয়নি', + 'account_creation_invalid_defaultGroup' => 'পূর্বনির্ধারিত দলটি ভুল হয়েছে', + + + // Password + 'password_change_successful' => 'পাসওয়ার্ড সফলভাবে পরিবর্তন করা হয়েছে', + 'password_change_unsuccessful' => 'পাসওয়ার্ডটি পরিবর্তন করা যাচ্ছেনা', + 'forgot_password_successful' => 'পাসওয়ার্ড পরিবর্তনের জন্য ই-মেইল করা হয়েছে', + 'forgot_password_unsuccessful' => 'পরিবর্তনযোগ লিঙ্ক ই-মেইল করা যাচ্ছেনা', + + // Activation + 'activate_successful' => 'অ্যাকাউন্টটি সফলভাবে চালু হয়েছে', + 'activate_unsuccessful' => 'অ্যাকাউন্টটি চালু করা যাচ্ছেনা', + 'deactivate_successful' => 'অ্যাকাউন্টটি নিষ্ক্রিয় করা হয়েছে', + 'deactivate_unsuccessful' => 'অ্যাকাউন্টটি নিষ্ক্রিয় করা যাচ্ছেনা', + 'activation_email_successful' => 'সক্রিয়করণ ইমেল পাঠানো হয়েছে। আপনার ইনবক্স অথবা স্প্যামে চেক করুণ', + 'activation_email_unsuccessful' => 'সক্রিয়করণ ইমেল পাঠানো যাচ্ছেনা', + 'deactivate_current_user_unsuccessful'=> 'আপনি নিজেকে নিজেকে নিষ্ক্রিয় করতে পারবেন না।', + + // Login / Logout + 'login_successful' => 'আপনি সফলভাবে প্রবেশ করেছেন', + 'login_unsuccessful' => 'প্রবেশ করা যাচ্ছেনা', + 'login_unsuccessful_not_active' => 'অ্যাকাউন্টটি নিষ্ক্রিয়', + 'login_timeout' => 'অস্থায়ীভাবে লক হয়েছে। পরে আবার চেষ্টা করুণ।', + 'login_unsuccessful' => 'লগইন করা যাচ্ছেনা', + 'login_unsuccessful_not_active' => 'অ্যাকাউন্টটি নিষ্ক্রিয়', + 'login_timeout' => 'অস্থায়ীভাবে লগ আউট হয়েছে। পরে আবার চেষ্টা করুণ।', + 'logout_successful' => 'সফলভাবে লগ আউট হয়েছে', + + // Account Changes + 'update_successful' => 'অ্যাকাউন্টের তথ্য সফলভাবে সংস্করণ করা হয়েছে', + 'update_unsuccessful' => 'অ্যাকাউন্টের তথ্য সংস্করণ করা যাচ্ছেনা', + 'delete_successful' => 'ব্যবহারকারীকে মুছে ফেলা হয়েছে', + 'delete_unsuccessful' => 'ব্যবহারকারীকে মুছে ফেলা যাচ্ছেনা', + + // Groups + 'group_creation_successful' => 'সফলভাবে দলটি তৈরি করা হয়েছে', + 'group_already_exists' => 'একই নামে ইতিমধ্যে আরেকটি গ্রুপ তৈরি করা হয়েছে', + 'group_update_successful' => 'দলটির বিবরণ সংস্করণ করা হয়েছে', + 'group_delete_successful' => 'দলটি মুছে ফেলা হয়েছে', + 'group_delete_unsuccessful' => 'দলটি মুছে ফেলা যাচ্ছেনা', + 'group_delete_notallowed' => 'অ্যাডমিনিস্ট্রেটরদের দলটি মুছে ফেলা যাবেনা', + 'group_name_required' => 'দলের নামটি অবশ্যই দিতে হবে', + 'group_name_admin_not_alter' => 'অ্যাডমিনিস্ট্রেটরদের দলটির নাম সংস্করণ করা যাবেনা', + + // Activation Email + 'emailActivation_subject' => 'অ্যাকাউন্ট সক্রিয়করণ', + 'emailActivate_heading' => '%s এর জন্য অ্যাকাউন্ট সক্রিয়করণ প্রক্রিয়া', + 'emailActivate_subheading' => 'দয়া করে এই লিঙ্কটি ক্লিক করুণ %s.', + 'emailActivate_link' => 'আপনার অ্যাকাউন্ট টি সক্রিয় করুণ', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'ভুলে যাওয়া পাসওয়ার্ড পুনরূদ্ধার', + 'emailForgotPassword_heading' => '%s এর জন্য পাসওয়ার্ড পুনরূদ্ধার করন প্রক্রিয়া', + 'emailForgotPassword_subheading' => 'দয়া করে এই লিঙ্কটি ক্লিক করুণ %s.', + 'emailForgotPassword_link' => 'আপনার অ্যাকাউন্ট টি পুনরূদ্ধার করুণ', + + // New Password Email + 'email_new_password_subject' => 'নতুন পাসওয়ার্ড', + 'email_new_password_heading' => '%s এর জন্য নতুন পাসওয়ার্ড', + 'email_new_password_subheading' => 'আপনার পাসওয়ার্ড পুনরায় সেট করা হয়েছে: %s', +]; diff --git a/Language/ca/Auth.php b/Language/ca/Auth.php new file mode 100644 index 000000000..6fbb62cf6 --- /dev/null +++ b/Language/ca/Auth.php @@ -0,0 +1,147 @@ + 'Aquest formulari no ha passat els controls de seguretat.', + + // Login + 'login_heading' => 'Inicia sessió', + 'login_subheading' => 'Si us plau, entra amb el teu correu-e/nom d\'usuari i contrasenya a continuació.', + 'login_identity_label' => 'Correu-e/Nom d\'usuari:', + 'login_password_label' => 'Contrasenya:', + 'login_remember_label' => 'Recorda\'m:', + 'login_submit_btn' => 'Entra', + 'login_forgot_password' => 'Has oblidat la teva contrasenya?', + + // Index + 'index_heading' => 'Usuaris', + 'index_subheading' => 'A continuació es mostra una llista dels usuaris.', + 'index_fname_th' => 'Nom', + 'index_lname_th' => 'Cognom', + 'index_email_th' => 'Correu-e', + 'index_groups_th' => 'Grups', + 'index_status_th' => 'Estat', + 'index_action_th' => 'Acció', + 'index_active_link' => 'Actiu', + 'index_inactive_link' => 'Inactiu', + 'index_create_user_link' => 'Crea un nou usuari', + 'index_create_group_link' => 'Crea un nou grup', + + // Deactivate User + 'deactivate_heading' => 'Desactivar usuari', + 'deactivate_subheading' => 'Estàs segur que vols desactivar l\'usuari \'%s\'', + 'deactivate_confirm_y_label' => 'Sí:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Envia', + 'deactivate_validation_confirm_label' => 'confirmació', + 'deactivate_validation_user_id_label' => 'ID d\'usuari', + + // Create User + 'create_user_heading' => 'Crea Usuari', + 'create_user_subheading' => 'Si us plau, introdueix la informació dels usuaris a continuació.', + 'create_user_fname_label' => 'Nom:', + 'create_user_lname_label' => 'Cognom:', + 'create_user_company_label' => 'Nom de l\'empresa:', + 'create_user_identity_label' => 'Identitat:', + 'create_user_email_label' => 'Correu-e:', + 'create_user_phone_label' => 'Telèfon:', + 'create_user_password_label' => 'Contrasenya:', + 'create_user_password_confirm_label' => 'Confirma Contrasenya:', + 'create_user_submit_btn' => 'Crea Usuari', + 'create_user_validation_fname_label' => 'Nom', + 'create_user_validation_lname_label' => 'Cognom', + 'create_user_validation_identity_label' => 'Identitat', + 'create_user_validation_email_label' => 'Adreça de correu-e', + 'create_user_validation_phone_label' => 'Telèfon', + 'create_user_validation_company_label' => 'Nom de l\'empresa', + 'create_user_validation_password_label' => 'Contrasenya', + 'create_user_validation_password_confirm_label' => 'Confirma Contrasenya', + + // Edit User + 'edit_user_heading' => 'Editar Usuari', + 'edit_user_subheading' => 'Si us plau, introdueix la informació dels usuaris a continuació.', + 'edit_user_fname_label' => 'Nom:', + 'edit_user_lname_label' => 'Cognom:', + 'edit_user_company_label' => 'Nom de l\'empresa:', + 'edit_user_email_label' => 'Correu-e:', + 'edit_user_phone_label' => 'Telèfon:', + 'edit_user_password_label' => 'Contrasenya: (si es canvia la contrasenya)', + 'edit_user_password_confirm_label' => 'Confirm Contrasenya: (si es canvia la contrasenya)', + 'edit_user_groups_heading' => 'Membre dels grups', + 'edit_user_submit_btn' => 'Desar Usuari', + 'edit_user_validation_fname_label' => 'Nom', + 'edit_user_validation_lname_label' => 'Cognom', + 'edit_user_validation_email_label' => 'Adreça de Correu-e', + 'edit_user_validation_phone_label' => 'Telèfon', + 'edit_user_validation_company_label' => 'Nom de l\'empresa', + 'edit_user_validation_groups_label' => 'Grups', + 'edit_user_validation_password_label' => 'Contrasenya', + 'edit_user_validation_password_confirm_label' => 'Confirmació de la Contrasenya', + + // Create Group + 'create_group_title' => 'Crea Grup', + 'create_group_heading' => 'Crea Grup', + 'create_group_subheading' => 'Si us plau, introdueix la informació del grup a continuació.', + 'create_group_name_label' => 'Nom del Grup:', + 'create_group_desc_label' => 'Descripció:', + 'create_group_submit_btn' => 'Crea Grup', + 'create_group_validation_name_label' => 'Nom del Grup', + 'create_group_validation_desc_label' => 'Descripció', + + // Edit Group + 'edit_group_title' => 'Edita Grup', + 'edit_group_saved' => 'Grup Desat', + 'edit_group_heading' => 'Edita Grup', + 'edit_group_subheading' => 'Si us plau, introdueix la informació del grup a continuació.', + 'edit_group_name_label' => 'Nom del Grup:', + 'edit_group_desc_label' => 'Descripció:', + 'edit_group_submit_btn' => 'Desa Grup', + 'edit_group_validation_name_label' => 'Nom del Grup', + 'edit_group_validation_desc_label' => 'Descripció', + + // Change Password + 'change_password_heading' => 'Canvi de Contrasenya', + 'change_password_old_password_label' => 'Contrasenya antiga:', + 'change_password_new_password_label' => 'Contrasenya nova (mínim %s caràcters):', + 'change_password_new_password_confirm_label' => 'Confirmar Contrasenya nova:', + 'change_password_submit_btn' => 'Canvia', + 'change_password_validation_old_password_label' => 'Contrasenya antiga', + 'change_password_validation_new_password_label' => 'Contrasenya nova', + 'change_password_validation_new_password_confirm_label' => 'Confirmar Contrasenya nova', + + // Forgot Password + 'forgot_password_heading' => 'Contrasenya oblidada', + 'forgot_password_subheading' => 'Introdueix el teu %s perquè puguem enviar un correu electrònic per restablir la contrasenya.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Envia', + 'forgot_password_validation_email_label' => 'Adreça de Correu-e', + 'forgot_password_identity_label' => 'Usuari', + 'forgot_password_email_identity_label' => 'Correu-e', + 'forgot_password_email_not_found' => 'No hi ha registre d\'aquesta adreça de correu electrònic.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Canvia Contrasenya', + 'reset_password_new_password_label' => 'Contrasenya nova (mínim %s caràcters):', + 'reset_password_new_password_confirm_label' => 'Confirmar Contrasenya nova:', + 'reset_password_submit_btn' => 'Canvia', + 'reset_password_validation_new_password_label' => 'Contrasenya nova', + 'reset_password_validation_new_password_confirm_label' => 'Confirmar nova Contrasenya', +]; diff --git a/Language/ca/IonAuth.php b/Language/ca/IonAuth.php new file mode 100644 index 000000000..0ce83a86e --- /dev/null +++ b/Language/ca/IonAuth.php @@ -0,0 +1,77 @@ + 'Compte creat amb èxit', + 'account_creation_unsuccessful' => 'No ha estat possible crear el compte', + 'account_creation_duplicate_email' => 'Email en ús o invàlid', + 'account_creation_duplicate_identity' => 'Nom d'usuari en ús o invàlid', + 'account_creation_missing_defaultGroup' => 'No s'ha establert grup per defecte', + 'account_creation_invalid_defaultGroup' => 'Conjunt de noms de grup per defecte invalid', + + + // Password + 'password_change_successful' => 'Contrasenya canviada amb èxit', + 'password_change_unsuccessful' => 'No ha estat possible canviar la contrasenya', + 'forgot_password_successful' => 'Nova contrasenya enviada per email', + 'forgot_password_unsuccessful' => 'No ha estat possible crear una nova contrasenya', + + // Activation + 'activate_successful' => 'Compte activat', + 'activate_unsuccessful' => 'No ha estat possible activar el compte', + 'deactivate_successful' => 'Compte desactivat', + 'deactivate_unsuccessful' => 'No ha estat possible desactivar el compte', + 'activation_email_successful' => 'Email d'activació enviat', + 'activation_email_unsuccessful' => 'No ha estat possible enviar l'email d'activació', + 'deactivate_current_user_unsuccessful' => 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Sessió iniciada amb èxit', + 'login_unsuccessful' => 'No ha estat possible iniciar sessió', + 'login_unsuccessful_not_active' => 'Compte inactiu', + 'login_timeout' => 'Temporalment bloquejat. Torna-ho a provar més tard.', + 'logout_successful' => 'Sessió finalitzada amb èxit', + + // Account Changes + 'update_successful' => 'Informació del compte actualitzat amb èxit', + 'update_unsuccessful' => 'No s'ha pogut actualitzar la informació del compte', + 'delete_successful' => 'Usuari eliminat', + 'delete_unsuccessful' => 'No s'ha pogut Eliminar l'usuari', + + // Groups + 'group_creation_successful' => 'Grup creat amb èxit', + 'group_already_exists' => 'Nom de grup no disponible', + 'group_update_successful' => 'Actualitzats detalls de grup', + 'group_delete_successful' => 'Grup esborrat', + 'group_delete_unsuccessful' => 'No s'ha pogut esborrar el grup', + 'group_delete_notallowed' => 'No es pot eliminar el grup dels administradors', + 'group_name_required' => 'El nom de grup és un camp necessari', + 'group_name_admin_not_alter' => 'El nom del grup Admin no es pot canviar', + + // Activation Email + 'emailActivation_subject' => 'Activació del compte', + 'emailActivate_heading' => 'Activar el compte de %s', + 'emailActivate_subheading' => 'Si us plau, cliqueu el link per %s.', + 'emailActivate_link' => 'Activa el teu compte', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Verificació de contrasenya oblidada', + 'emailForgotPassword_heading' => 'Restableix contrasenya a %s', + 'emailForgotPassword_subheading' => 'Si us plau, cliqueu el link per %s.', + 'emailForgotPassword_link' => 'Restableix la teva contrasenya', +]; diff --git a/Language/cs/Auth.php b/Language/cs/Auth.php new file mode 100644 index 000000000..66985fefc --- /dev/null +++ b/Language/cs/Auth.php @@ -0,0 +1,152 @@ + 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Please login with your email/username and password below.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Remember Me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Forgot your password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Below is a list of the users.', + 'index_fname_th' => 'First Name', + 'index_lname_th' => 'Last Name', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groups', + 'index_status_th' => 'Status', + 'index_action_th' => 'Action', + 'index_active_link' => 'Active', + 'index_inactive_link' => 'Inactive', + 'index_create_user_link' => 'Create a new user', + 'index_create_group_link' => 'Create a new group', + + // Deactivate User + 'deactivate_heading' => 'Deactivate User', + 'deactivate_subheading' => 'Are you sure you want to deactivate the user \'%s\'', + 'deactivate_confirm_y_label' => 'Yes:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Submit', + 'deactivate_validation_confirm_label' => 'confirmation', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Create User', + 'create_user_subheading' => 'Please enter the users information below.', + 'create_user_fname_label' => 'First Name:', + 'create_user_lname_label' => 'Last Name:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Company Name:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Phone:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Confirm Password:', + 'create_user_submit_btn' => 'Create User', + 'create_user_validation_fname_label' => 'First Name', + 'create_user_validation_lname_label' => 'Last Name', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Company Name', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the users information below.', + 'edit_user_fname_label' => 'First Name:', + 'edit_user_lname_label' => 'Last Name:', + 'edit_user_company_label' => 'Company Name:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Password: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Password: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'First Name', + 'edit_user_validation_lname_label' => 'Last Name', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Phone', + 'edit_user_validation_company_label' => 'Company Name', + 'edit_user_validation_groups_label' => 'Groups', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Create Group + 'create_group_title' => 'Create Group', + 'create_group_heading' => 'Create Group', + 'create_group_subheading' => 'Please enter the group information below.', + 'create_group_name_label' => 'Group Name:', + 'create_group_desc_label' => 'Description:', + 'create_group_submit_btn' => 'Create Group', + 'create_group_validation_name_label' => 'Group Name', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Edit Group', + 'edit_group_saved' => 'Group Saved', + 'edit_group_heading' => 'Edit Group', + 'edit_group_subheading' => 'Please enter the group information below.', + 'edit_group_name_label' => 'Group Name:', + 'edit_group_desc_label' => 'Description:', + 'edit_group_submit_btn' => 'Save Group', + 'edit_group_validation_name_label' => 'Group Name', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Change Password', + 'change_password_old_password_label' => 'Old Password:', + 'change_password_new_password_label' => 'New Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'Confirm New Password:', + 'change_password_submit_btn' => 'Change', + 'change_password_validation_old_password_label' => 'Old Password', + 'change_password_validation_new_password_label' => 'New Password', + 'change_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Please enter your %s so we can send you an email to reset your password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_username_identity_label' => 'Username', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Change Password', + 'reset_password_new_password_label' => 'New Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'Confirm New Password:', + 'reset_password_submit_btn' => 'Change', + 'reset_password_validation_new_password_label' => 'New Password', + 'reset_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/cs/IonAuth.php b/Language/cs/IonAuth.php new file mode 100644 index 000000000..18d49e805 --- /dev/null +++ b/Language/cs/IonAuth.php @@ -0,0 +1,74 @@ + 'Účet byl úspěšně vytvořen', + 'account_creation_unsuccessful' => 'Nelze vytvořit účet', + 'account_creation_duplicate_email' => 'E-mail již existuje nebo je neplatný', + 'account_creation_duplicate_identity' => 'Uživatelské jméno již existuje nebo je neplatný', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + // Password + 'password_change_successful' => 'Heslo bylo úspěšně změněno', + 'password_change_unsuccessful' => 'Nelze změnit heslo', + 'forgot_password_successful' => 'Heslo bylo odeslané na e-mail', + 'forgot_password_unsuccessful' => 'Nelze obnovit heslo', + + // Activation + 'activate_successful' => 'Účet byl aktivován', + 'activate_unsuccessful' => 'Nelze aktivovat účet', + 'deactivate_successful' => 'Účet byl deaktivován', + 'deactivate_unsuccessful' => 'Nelze deaktivován účet', + 'activation_email_successful' => 'Aktivační e-mail byl odeslán', + 'activation_email_unsuccessful' => 'Nelze odeslat aktivační e-mail', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Úspěšně přihlášen', + 'login_unsuccessful' => 'Nesprávný e-mail nebo heslo', + 'login_unsuccessful_not_active' => 'Účet je neaktivní', + 'login_timeout' => 'Temporarily Locked Out. Try again later.', + 'logout_successful' => 'Úspěšné odhlášení', + + // Account Changes + 'update_successful' => 'Informace o účtu byla úspěšně aktualizována', + 'update_unsuccessful' => 'Nelze aktualizovat informace o účtu', + 'delete_successful' => 'Uživatel byl smazán', + 'delete_unsuccessful' => 'Nelze smazat uživatele', + + // Groups + 'group_creation_successful' => 'Group created Successfully', + 'group_already_exists' => 'Group name already taken', + 'group_update_successful' => 'Group details updated', + 'group_delete_successful' => 'Group deleted', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Account Activation', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Please click this link to %s.', + 'emailActivate_link' => 'Activate Your Account', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Forgotten Password Verification', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/da/Auth.php b/Language/da/Auth.php new file mode 100644 index 000000000..decef0aa5 --- /dev/null +++ b/Language/da/Auth.php @@ -0,0 +1,157 @@ + 'Formularet bestod ikke vores sikkerhedskontrol.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Login med din email og kodeord herunder.', + 'login_identity_label' => 'Email:', + 'login_password_label' => 'Kodeord:', + 'login_remember_label' => 'Husk mig:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Glemt dit kodeord?', + + // Index + 'index_heading' => 'Brugere', + 'index_subheading' => 'Nedeunder er der en liste af brugere.', + 'index_fname_th' => 'Øgenavn', + 'index_lname_th' => 'Efternavn', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Grupper', + 'index_status_th' => 'Status', + 'index_action_th' => 'Aktion', + 'index_active_link' => 'Aktiv', + 'index_inactive_link' => 'Inaktiv', + 'index_inactive_link' => 'Inaktiv', + 'index_create_user_link' => 'Opret en ny bruger', + 'index_create_group_link' => 'Opret en ny gruppe', + + // Deactivate User + 'deactivate_heading' => 'Deaktivér Bruger', + 'deactivate_subheading' => 'Er du sikker på at du ønsker at deaktivere brugeren \'%s\'', + 'deactivate_confirm_y_label' => 'Ja:', + 'deactivate_confirm_n_label' => 'Nej:', + 'deactivate_submit_btn' => 'Afsend', + 'deactivate_validation_confirm_label' => 'bekræftelse', + 'deactivate_validation_user_id_label' => 'bruger ID', + + // Create User + 'create_user_heading' => 'Opret Bruger', + 'create_user_subheading' => 'Indtast brugerinformationerne nedeunder.', + 'create_user_fname_label' => 'Øgenavn:', + 'create_user_lname_label' => 'Efternavn:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Firmanavn:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telefon:', + 'create_user_password_label' => 'Kodeord:', + 'create_user_password_confirm_label' => 'Bekræft Kodeord:', + 'create_user_submit_btn' => 'Opret Bruger', + 'create_user_validation_fname_label' => 'Øgenavn', + 'create_user_validation_lname_label' => 'Efternavn', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email-adresse', + 'create_user_validation_phone1_label' => 'Første del af telefonnummeret', + 'create_user_validation_phone2_label' => 'Anden del af telefonnummeret', + 'create_user_validation_phone3_label' => 'Tredje del af telefonnummeret', + 'create_user_validation_company_label' => 'Firmanavn', + 'create_user_validation_password_label' => 'Kodeord', + 'create_user_validation_password_confirm_label' => 'Bekræft Kodeord', + + // Edit User + 'edit_user_heading' => 'Rediger Bruger', + 'edit_user_subheading' => 'Indtast brugerinformationerne nedeunder.', + 'edit_user_fname_label' => 'Øgenavn:', + 'edit_user_lname_label' => 'Efternavn:', + 'edit_user_company_label' => 'Firmanavn:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telefon:', + 'edit_user_password_label' => 'Kodeord: (hvis du skifter det nu)', + 'edit_user_password_confirm_label' => 'Bekræft Kodeord: (hvis du skifter det nu)', + 'edit_user_groups_heading' => 'Medlem af gruppe', + 'edit_user_submit_btn' => 'Gem Bruger', + 'edit_user_validation_fname_label' => 'Øgenavn', + 'edit_user_validation_lname_label' => 'Efternavn', + 'edit_user_validation_email_label' => 'Email-adresse', + 'create_user_validation_phone1_label' => 'Første del af telefonnummeret', + 'create_user_validation_phone2_label' => 'Anden del af telefonnummeret', + 'create_user_validation_phone3_label' => 'Tredje del af telefonnummeret', + 'edit_user_validation_company_label' => 'Firmanavn', + 'edit_user_validation_groups_label' => 'Grupper', + 'edit_user_validation_password_label' => 'Kodeord', + 'edit_user_validation_password_confirm_label' => 'Bekræft Kodeord', + + // Create Group + 'create_group_title' => 'Opret gruppe', + 'create_group_heading' => 'Opret gruppe', + 'create_group_subheading' => 'Indtast gruppeinformationerne herunder.', + 'create_group_name_label' => 'Gruppenavn:', + 'create_group_desc_label' => 'Beskrivelse:', + 'create_group_submit_btn' => 'Opret Gruppe', + 'create_group_validation_name_label' => 'Gruppenavn', + 'create_group_validation_desc_label' => 'Beskrivelse', + + // Edit Group + 'edit_group_title' => 'Ret Gruppen', + 'edit_group_saved' => 'Gruppen er gemt', + 'edit_group_heading' => 'Ret Gruppen', + 'edit_group_subheading' => 'Indtast gruppeinformationerne herunder.', + 'edit_group_name_label' => 'Gruppenavn:', + 'edit_group_desc_label' => 'Beskrivelse:', + 'edit_group_submit_btn' => 'Gem Gruppe', + 'edit_group_validation_name_label' => 'Gruppenavn', + 'edit_group_validation_desc_label' => 'Beskrivelse', + + // Change Password + 'change_password_heading' => 'Skift Kodeord', + 'change_password_old_password_label' => 'Gammelt Kodeord:', + 'change_password_new_password_label' => 'Nyt Kodeord (mindst % bogstaver langt):', + 'change_password_new_password_confirm_label' => 'Bekræft nyt kodeord:', + 'change_password_submit_btn' => 'Skift', + 'change_password_validation_old_password_label' => 'Gammelt Kodeord', + 'change_password_validation_new_password_label' => 'Nyt Kodeord', + 'change_password_validation_new_password_confirm_label' => 'Bekræft nyt kodeord', + + // Forgot Password + 'forgot_password_heading' => 'Glemt kodeordet', + 'forgot_password_subheading' => 'Indtast din %s så vi kan sende dig en mail for at nulstille dit kodeord.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Afsend', + 'forgot_password_validation_email_label' => 'Email-adresse', + 'forgot_password_username_identity_label' => 'Brugernavn', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Skift Kodeord', + 'reset_password_new_password_label' => 'Nyt Kodeord (mindst % bogstaver langt):', + 'reset_password_new_password_confirm_label' => 'Bekræft nyt kodeord:', + 'reset_password_submit_btn' => 'Skift', + 'reset_password_validation_new_password_label' => 'Nyt Kodeord', + 'reset_password_validation_new_password_confirm_label' => 'Bekræft nyt kodeord', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Nulstil kodeordet for %s', + 'emailForgotPassword_subheading' => 'Tryk på dette link for at %s.', + 'emailForgotPassword_link' => 'Nulstil Dit Kodeordet', +]; diff --git a/Language/da/IonAuth.php b/Language/da/IonAuth.php new file mode 100644 index 000000000..842e152c8 --- /dev/null +++ b/Language/da/IonAuth.php @@ -0,0 +1,68 @@ + 'Konto oprettet', + 'account_creation_unsuccessful' => 'Det var ikke muligt at oprette kontoen', + 'account_creation_duplicate_email' => 'Email allerede i brug eller ugyldig', + 'account_creation_duplicate_identity' => 'Brugernavn allerede i brug eller ugyldigt', + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + // Password + 'password_change_successful' => 'Kodeordet er ændret', + 'password_change_unsuccessful' => 'Det var ikke muligt at ændre kodeordet', + 'forgot_password_successful' => 'Email vedrørende nulstilling af kodeord er afsendt', + 'forgot_password_unsuccessful' => 'Det var ikke muligt at nulstille kodeordet', + // Activation + 'activate_successful' => 'Konto aktiveret', + 'activate_unsuccessful' => 'Det var ikke muligt at aktivere kontoen', + 'deactivate_successful' => 'Konto deaktiveret', + 'deactivate_unsuccessful' => 'Det var ikke muligt at deaktivere kontoen', + 'activation_email_successful' => 'Email vedrørende aktivering af konto er afsendt', + 'activation_email_unsuccessful' => 'Det var ikke muligt at sende email vedrørende aktivering af konto', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + // Login / Logout + 'login_successful' => 'Logged ind', + 'login_unsuccessful' => 'Ugyldigt login', + 'login_unsuccessful_not_active' => 'Kontoen er inaktiv', + 'login_timeout' => 'Temporarily Locked Out. Try again later.', + 'logout_successful' => 'Logged ud', + // Account Changes + 'update_successful' => 'Kontoen er opdateret', + 'update_unsuccessful' => 'Det var ikke muligt at opdatere kontoen', + 'delete_successful' => 'Bruger slettet', + 'delete_unsuccessful' => 'Det var ikke muligt at slette bruger', + // Groups + 'group_creation_successful' => 'Group created Successfully', + 'group_already_exists' => 'Group name already taken', + 'group_update_successful' => 'Group details updated', + 'group_delete_successful' => 'Group deleted', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Konto aktivering', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Tryk på dette link for at %s.', + 'emailActivate_link' => 'Aktivér din brugerkonto', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Verifikation af glemt adgangskode', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/de/Auth.php b/Language/de/Auth.php new file mode 100644 index 000000000..e20d4cdf5 --- /dev/null +++ b/Language/de/Auth.php @@ -0,0 +1,160 @@ + 'Dieses Formular hat unsere Sicherheitskontrollen nicht bestanden.', + + // Login + 'login_heading' => 'Einloggen', + 'login_subheading' => 'Bitte loggen Sie sich ein mit Ihrer/n Email/Benutzernamen und Kennwort unten ein.', + 'login_identity_label' => 'Email/Benutzername:', + 'login_password_label' => 'Kennwort:', + 'login_remember_label' => 'Merken Sie mich:', + 'login_submit_btn' => 'Einloggen', + 'login_forgot_password' => 'Ihr Kennwort vergessen?', + + // Index + 'index_heading' => 'Benutzer', + 'index_subheading' => 'Im Folgenden werden alle Benutzer aufgelistet.', + 'index_fname_th' => 'Vorname', + 'index_lname_th' => 'Nachname', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Gruppen', + 'index_status_th' => 'Status', + 'index_action_th' => 'Aktion', + 'index_active_link' => 'Aktiv', + 'index_inactive_link' => 'Inaktiv', + 'index_inactive_link' => 'Inaktiv', + 'index_create_user_link' => 'Einen neuen Benutzer anlegen', + 'index_create_group_link' => 'Eine neue Gruppe anlegen', + + // Deactivate User + 'deactivate_heading' => 'Benutzer deaktivieren', + 'deactivate_subheading' => 'Sind Sie sicher dass Sie den Benutzer \'%s\' deaktivieren möchten', + 'deactivate_confirm_y_label' => 'Ja:', + 'deactivate_confirm_n_label' => 'Nein:', + 'deactivate_submit_btn' => 'Eingeben', + 'deactivate_validation_confirm_label' => 'bestätigung', + 'deactivate_validation_user_id_label' => 'Benutzer ID', + + // Create User + 'create_user_heading' => 'Benutzer anlegen', + 'create_user_subheading' => 'Bitte geben Sie die Daten zum Benutzer unten ein.', + 'create_user_fname_label' => 'Vorname:', + 'create_user_lname_label' => 'Nachname:', + 'create_user_identity_label' => 'Benutzername:', + 'create_user_company_label' => 'Firmenname:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telefon:', + 'create_user_password_label' => 'Kennwort:', + 'create_user_password_confirm_label' => 'Kennwort bestätigen:', + 'create_user_submit_btn' => 'Benutzer anlegen', + 'create_user_validation_fname_label' => 'Vorname', + 'create_user_validation_lname_label' => 'Nachname', + 'create_user_validation_identity_label' => 'Benutzername', + 'create_user_validation_email_label' => 'Email', + 'create_user_validation_phone1_label' => 'Erster Teil der Telefonnummer', + 'create_user_validation_phone2_label' => 'Zweiter Teil der Telefonnummer', + 'create_user_validation_phone3_label' => 'Dritter Teil der Telefonnummer', + 'create_user_validation_company_label' => 'Firmenname', + 'create_user_validation_password_label' => 'Kennwort', + 'create_user_validation_password_confirm_label' => 'Kennwort bestätigen', + + // Edit User + 'edit_user_heading' => 'Benutzer bearbeiten', + 'edit_user_subheading' => 'Bitte geben Sie die Daten zum Benutzer unten ein.', + 'edit_user_fname_label' => 'Vorname:', + 'edit_user_lname_label' => 'Nachname:', + 'edit_user_company_label' => 'Firmenname:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telefon:', + 'edit_user_password_label' => 'Kennwort: (falls Sie es ändern)', + 'edit_user_password_confirm_label' => 'Kennwort bestätigen: (falls Sie es ändern)', + 'edit_user_groups_heading' => 'Mitglied der Gruppen', + 'edit_user_submit_btn' => 'Benutzerdaten speichern', + 'edit_user_validation_fname_label' => 'Vorname', + 'edit_user_validation_lname_label' => 'Nachname', + 'edit_user_validation_email_label' => 'Email', + 'edit_user_validation_phone1_label' => 'Erster Teil der Telefonnummer', + 'edit_user_validation_phone2_label' => 'Zweiter Teil der Telefonnummer', + 'edit_user_validation_phone3_label' => 'Dritter Teil der Telefonnummer', + 'edit_user_validation_company_label' => 'Firmenname', + 'edit_user_validation_groups_label' => 'Gruppen', + 'edit_user_validation_password_label' => 'Kennwort', + 'edit_user_validation_password_confirm_label' => 'Kennwort bestätigen', + + // Create Group + 'create_group_title' => 'Gruppe anlegen', + 'create_group_heading' => 'Gruppe anlegen', + 'create_group_subheading' => 'Bitte geben Sie die Daten zur Gruppe unten ein.', + 'create_group_name_label' => 'Gruppenname:', + 'create_group_desc_label' => 'Beschreibung:', + 'create_group_submit_btn' => 'Gruppe anlegen', + 'create_group_validation_name_label' => 'Gruppenname', + 'create_group_validation_desc_label' => 'Beschreibung', + + // Edit Group + 'edit_group_title' => 'Gruppe bearbeiten', + 'edit_group_saved' => 'Gruppe gespeichert', + 'edit_group_heading' => 'Gruppe bearbeiten', + 'edit_group_subheading' => 'Bitte geben Sie die Daten zur Gruppe unten ein.', + 'edit_group_name_label' => 'Gruppenname:', + 'edit_group_desc_label' => 'Beschreibung:', + 'edit_group_submit_btn' => 'Gruppe speichern', + 'edit_group_validation_name_label' => 'Gruppenname', + 'edit_group_validation_desc_label' => 'Beschreibung', + + // Change Password + 'change_password_heading' => 'Kennwort Ändern', + 'change_password_old_password_label' => 'Altes Kennwort:', + 'change_password_new_password_label' => 'Neues Kennwort (mindestens %s Zeichen lang):', + 'change_password_new_password_confirm_label' => 'Neues Kennwort bestätigen:', + 'change_password_submit_btn' => 'Ändern', + 'change_password_validation_old_password_label' => 'Altes Kennwort', + 'change_password_validation_new_password_label' => 'Neues Kennwort', + 'change_password_validation_new_password_confirm_label' => 'Neues Kennwort bestätigen', + + // Forgot Password + 'forgot_password_heading' => 'Kennwort vergessen', + 'forgot_password_subheading' => 'Bitte geben Sie Ihre %s ein damit wir Ihnen eine Mail schicken können um das Kennwort zu ändern.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Eingabe', + 'forgot_password_validation_email_label' => 'Email', + 'forgot_password_username_identity_label' => 'Benutzername', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + + // Reset Password + 'reset_password_heading' => 'Kennwort ändern', + 'reset_password_new_password_label' => 'Neues Kennwort (mindestens %s Zeichen lang):', + 'reset_password_new_password_confirm_label' => 'Neues Kennwort bestätigen:', + 'reset_password_submit_btn' => 'Ändern', + 'reset_password_validation_new_password_label' => 'Neues Kennwort', + 'reset_password_validation_new_password_confirm_label' => 'Neues Kennwort bestätigen', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Kennwort für %s zurücksetzen', + 'emailForgotPassword_subheading' => 'Bitte drücken Sie diese Link um zu %s.', + 'emailForgotPassword_link' => 'Ihr Kennwort zurückstellen', +]; diff --git a/Language/de/IonAuth.php b/Language/de/IonAuth.php new file mode 100644 index 000000000..178ac3a8a --- /dev/null +++ b/Language/de/IonAuth.php @@ -0,0 +1,83 @@ + 'Das Benutzerkonto wurde erfolgreich erstellt', + 'account_creation_unsuccessful' => 'Das Benutzerkonto konnte nicht erstellt werden', + 'account_creation_duplicate_email' => 'Die E-Mail-Adresse ist ungültig oder wird bereits verwendet', + 'account_creation_duplicate_identity' => 'Der Benutzername ist ungültig oder wird bereits verwendet', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Standard-Gruppe ist nicht gesetzt', + 'account_creation_invalid_defaultGroup' => 'Ungültiger Standard-Gruppenname', + + + // Password + 'password_change_successful' => 'Das Passwort wurde erfolgreich geändert', + 'password_change_unsuccessful' => 'Das Passwort konnte nicht geändert werden', + 'forgot_password_successful' => 'Es wurde eine E-Mail zum Zurücksetzen des Passwortes versandt', + 'forgot_password_unsuccessful' => 'Das Passwort konnte nicht zurückgesetzt werden', + + // Activation + 'activate_successful' => 'Das Benutzerkonto wurde aktiviert', + 'activate_unsuccessful' => 'Das Benutzerkonto konnte nicht aktiviert werden', + 'deactivate_successful' => 'Das Benutzerkonto wurde deaktiviert', + 'deactivate_unsuccessful' => 'Das Benutzerkonto konnte nicht deaktiviert werden', + 'activation_email_successful' => 'Es wurde eine E-Mail zum Aktivieren des Benutzerkontos versandt', + 'activation_email_unsuccessful' => 'Die Aktivierungs-E-Mail konnte nicht versandt werden', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Login erfolgreich', + 'login_unsuccessful' => 'Login fehlgeschlagen', + 'login_unsuccessful_not_active' => 'Der Account ist deaktiviert', + 'login_timeout' => 'Vorübergehend gesperrt. Versuchen Sie es später noch einmal.', + 'logout_successful' => 'Logout erfolgreich', + + // Account Changes + 'update_successful' => 'Die Konto-Informationen wurden erfolgreich geändert', + 'update_unsuccessful' => 'Die Konto-Informationen konnten nicht geändert werden', + 'delete_successful' => 'Das Benutzerkonto wurde gelöscht', + 'delete_unsuccessful' => 'Das Benutzerkonto konnte nicht gelöscht werden', + + // Groups + 'group_creation_successful' => 'Gruppe wurde erfolgreich erstellt', + 'group_already_exists' => 'Gruppenname bereits vergeben', + 'group_update_successful' => 'Gruppendetails aktualisiert', + 'group_delete_successful' => 'Gruppe gelöscht', + 'group_delete_unsuccessful' => 'Gruppe konnte nicht gelöscht werden', + 'group_delete_notallowed' => 'Sie können die Administrator-Gruppe nicht löschen', + 'group_name_required' => '"Gruppenname" ist ein Pflichtfeld', + 'group_name_admin_not_alter' => 'Admin-Gruppenname kann nicht geändert werden', + + // Activation Email + 'emailActivation_subject' => 'Aktivierung des Kontos', + 'emailActivate_heading' => 'Konto aktivieren für %s', + 'emailActivate_subheading' => 'Bitte klicken Sie auf diesen Link, um %s.', + 'emailActivate_link' => 'Aktivieren Sie Ihr Benutzerkonto', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Vergessenes Kennwort Verifikation', + 'emailForgotPassword_heading' => 'Kennwort zurücksetzen für %s', + 'emailForgotPassword_subheading' => 'Bitte klicken Sie auf diesen Link, um %s.', + 'emailForgotPassword_link' => 'Ihr Kennwort zurückzusetzen', +]; diff --git a/Language/el/Auth.php b/Language/el/Auth.php new file mode 100644 index 000000000..66985fefc --- /dev/null +++ b/Language/el/Auth.php @@ -0,0 +1,152 @@ + 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Please login with your email/username and password below.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Remember Me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Forgot your password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Below is a list of the users.', + 'index_fname_th' => 'First Name', + 'index_lname_th' => 'Last Name', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groups', + 'index_status_th' => 'Status', + 'index_action_th' => 'Action', + 'index_active_link' => 'Active', + 'index_inactive_link' => 'Inactive', + 'index_create_user_link' => 'Create a new user', + 'index_create_group_link' => 'Create a new group', + + // Deactivate User + 'deactivate_heading' => 'Deactivate User', + 'deactivate_subheading' => 'Are you sure you want to deactivate the user \'%s\'', + 'deactivate_confirm_y_label' => 'Yes:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Submit', + 'deactivate_validation_confirm_label' => 'confirmation', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Create User', + 'create_user_subheading' => 'Please enter the users information below.', + 'create_user_fname_label' => 'First Name:', + 'create_user_lname_label' => 'Last Name:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Company Name:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Phone:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Confirm Password:', + 'create_user_submit_btn' => 'Create User', + 'create_user_validation_fname_label' => 'First Name', + 'create_user_validation_lname_label' => 'Last Name', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Company Name', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the users information below.', + 'edit_user_fname_label' => 'First Name:', + 'edit_user_lname_label' => 'Last Name:', + 'edit_user_company_label' => 'Company Name:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Password: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Password: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'First Name', + 'edit_user_validation_lname_label' => 'Last Name', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Phone', + 'edit_user_validation_company_label' => 'Company Name', + 'edit_user_validation_groups_label' => 'Groups', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Create Group + 'create_group_title' => 'Create Group', + 'create_group_heading' => 'Create Group', + 'create_group_subheading' => 'Please enter the group information below.', + 'create_group_name_label' => 'Group Name:', + 'create_group_desc_label' => 'Description:', + 'create_group_submit_btn' => 'Create Group', + 'create_group_validation_name_label' => 'Group Name', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Edit Group', + 'edit_group_saved' => 'Group Saved', + 'edit_group_heading' => 'Edit Group', + 'edit_group_subheading' => 'Please enter the group information below.', + 'edit_group_name_label' => 'Group Name:', + 'edit_group_desc_label' => 'Description:', + 'edit_group_submit_btn' => 'Save Group', + 'edit_group_validation_name_label' => 'Group Name', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Change Password', + 'change_password_old_password_label' => 'Old Password:', + 'change_password_new_password_label' => 'New Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'Confirm New Password:', + 'change_password_submit_btn' => 'Change', + 'change_password_validation_old_password_label' => 'Old Password', + 'change_password_validation_new_password_label' => 'New Password', + 'change_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Please enter your %s so we can send you an email to reset your password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_username_identity_label' => 'Username', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Change Password', + 'reset_password_new_password_label' => 'New Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'Confirm New Password:', + 'reset_password_submit_btn' => 'Change', + 'reset_password_validation_new_password_label' => 'New Password', + 'reset_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/el/IonAuth.php b/Language/el/IonAuth.php new file mode 100644 index 000000000..90fd2a2a5 --- /dev/null +++ b/Language/el/IonAuth.php @@ -0,0 +1,76 @@ + 'Ο Λογαριασμός Δημιουργήθηκε Επιτυχώς', + 'account_creation_unsuccessful' => 'Αποτυχία Δημιουργίας Λογαριασμού', + 'account_creation_duplicate_email' => 'Το Email χρησιμποιείται ήδη ή είναι λάθος', + 'account_creation_duplicate_identity' => 'Ο Χρήστης υπάρχει ήδη ή είναι λάθος', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + + // Password + 'password_change_successful' => 'Επιτυχής Αλλαγή Κωδικού', + 'password_change_unsuccessful' => 'Αδυναμία Αλλαγής Κωδικού', + 'forgot_password_successful' => 'Εστάλη Email Κωδικού Επαναφοράς', + 'forgot_password_unsuccessful' => 'Αδυναμία Επαναφοράς Κωδικού', + + // Activation + 'activate_successful' => 'Ο Λογαριασμός Ενεργοποιήθηκε', + 'activate_unsuccessful' => 'Αδυναμία Ενεργοποίησης Λογαριασμού', + 'deactivate_successful' => 'Ο Λογαριασμός Απενεργοποιήθηκε', + 'deactivate_unsuccessful' => 'Αδυναμία Απενεργοποίησης Λογαριασμού', + 'activation_email_successful' => 'Εστάλη Email Ενεργοποίησης Λογαριασμού', + 'activation_email_unsuccessful' => 'Αδυναμία Αποστολής Email Ενεργοποίησης', + + // Login / Logout + 'login_successful' => 'Συνδεθήκατε Επιτυχώς', + 'login_unsuccessful' => 'Λάθος Στοιχεία', + 'login_unsuccessful_not_active' => 'Account is inactive', + 'login_timeout' => 'Temporarily Locked Out. Try again later.', + 'logout_successful' => 'Αποσυνδεθήκατε Επιτυχώς', + + // Account Changes + 'update_successful' => 'Οι Πληροφορίες του Λογαριασμού Ενημερώθηκαν Επιτυχώς', + 'update_unsuccessful' => 'Αδυναμία Ενημέρωσης Πληροφοριών Λογαριασμού', + 'delete_successful' => 'Ο Χρήστης Διαγράφηκε', + 'delete_unsuccessful' => 'Αδυναμία Διαγραφής Χρήστη', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Groups + 'group_creation_successful' => 'Group created Successfully', + 'group_already_exists' => 'Group name already taken', + 'group_update_successful' => 'Group details updated', + 'group_delete_successful' => 'Group deleted', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Account Activation', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Please click this link to %s.', + 'emailActivate_link' => 'Activate Your Account', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Forgotten Password Verification', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/en/Auth.php b/Language/en/Auth.php new file mode 100644 index 000000000..dc716fe67 --- /dev/null +++ b/Language/en/Auth.php @@ -0,0 +1,149 @@ + 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Please login with your email/username and password below.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Remember Me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Forgot your password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Below is a list of the users.', + 'index_fname_th' => 'First Name', + 'index_lname_th' => 'Last Name', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groups', + 'index_status_th' => 'Status', + 'index_action_th' => 'Action', + 'index_active_link' => 'Active', + 'index_inactive_link' => 'Inactive', + 'index_create_user_link' => 'Create a new user', + 'index_create_group_link' => 'Create a new group', + + // Deactivate User + 'deactivate_heading' => 'Deactivate User', + 'deactivate_subheading' => 'Are you sure you want to deactivate the user \'%s\'', + 'deactivate_confirm_y_label' => 'Yes:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Submit', + 'deactivate_validation_confirm_label' => 'confirmation', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Create User', + 'create_user_subheading' => 'Please enter the user\'s information below.', + 'create_user_fname_label' => 'First Name:', + 'create_user_lname_label' => 'Last Name:', + 'create_user_company_label' => 'Company Name:', + 'create_user_identity_label' => 'Identity:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Phone:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Confirm Password:', + 'create_user_submit_btn' => 'Create User', + 'create_user_validation_fname_label' => 'First Name', + 'create_user_validation_lname_label' => 'Last Name', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Company Name', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the user\'s information below.', + 'edit_user_fname_label' => 'First Name:', + 'edit_user_lname_label' => 'Last Name:', + 'edit_user_company_label' => 'Company Name:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Password: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Password: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'First Name', + 'edit_user_validation_lname_label' => 'Last Name', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Phone', + 'edit_user_validation_company_label' => 'Company Name', + 'edit_user_validation_groups_label' => 'Groups', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Create Group + 'create_group_title' => 'Create Group', + 'create_group_heading' => 'Create Group', + 'create_group_subheading' => 'Please enter the group information below.', + 'create_group_name_label' => 'Group Name:', + 'create_group_desc_label' => 'Description:', + 'create_group_submit_btn' => 'Create Group', + 'create_group_validation_name_label' => 'Group Name', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Edit Group', + 'edit_group_saved' => 'Group Saved', + 'edit_group_heading' => 'Edit Group', + 'edit_group_subheading' => 'Please enter the group information below.', + 'edit_group_name_label' => 'Group Name:', + 'edit_group_desc_label' => 'Description:', + 'edit_group_submit_btn' => 'Save Group', + 'edit_group_validation_name_label' => 'Group Name', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Change Password', + 'change_password_old_password_label' => 'Old Password:', + 'change_password_new_password_label' => 'New Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'Confirm New Password:', + 'change_password_submit_btn' => 'Change', + 'change_password_validation_old_password_label' => 'Old Password', + 'change_password_validation_new_password_label' => 'New Password', + 'change_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Please enter your %s so we can send you an email to reset your password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_identity_label' => 'Identity', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username.', + + // Reset Password + 'reset_password_heading' => 'Change Password', + 'reset_password_new_password_label' => 'New Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'Confirm New Password:', + 'reset_password_submit_btn' => 'Change', + 'reset_password_validation_new_password_label' => 'New Password', + 'reset_password_validation_new_password_confirm_label' => 'Confirm New Password', +]; diff --git a/Language/en/IonAuth.php b/Language/en/IonAuth.php new file mode 100644 index 000000000..2d7a652ae --- /dev/null +++ b/Language/en/IonAuth.php @@ -0,0 +1,78 @@ + 'Account Successfully Created', + 'account_creation_unsuccessful' => 'Unable to Create Account', + 'account_creation_duplicate_email' => 'Email Already Used or Invalid', + 'account_creation_duplicate_identity' => 'Identity Already Used or Invalid', + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + // Password + 'password_change_successful' => 'Password Successfully Changed', + 'password_change_unsuccessful' => 'Unable to Change Password', + 'forgot_password_successful' => 'Password Reset Email Sent', + 'forgot_password_unsuccessful' => 'Unable to email the Reset Password link', + + // Activation + 'activate_successful' => 'Account Activated', + 'activate_unsuccessful' => 'Unable to Activate Account', + 'deactivate_successful' => 'Account De-Activated', + 'deactivate_unsuccessful' => 'Unable to De-Activate Account', + 'activation_email_successful' => 'Activation Email Sent. Please check your inbox or spam', + 'activation_email_unsuccessful' => 'Unable to Send Activation Email', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Logged In Successfully', + 'login_unsuccessful' => 'Incorrect Login', + 'login_unsuccessful_not_active' => 'Account is inactive', + 'login_timeout' => 'Temporarily Locked Out. Try again later.', + 'logout_successful' => 'Logged Out Successfully', + + // Account Changes + 'update_successful' => 'Account Information Successfully Updated', + 'update_unsuccessful' => 'Unable to Update Account Information', + 'delete_successful' => 'User Deleted', + 'delete_unsuccessful' => 'Unable to Delete User', + + // Groups + 'group_creation_successful' => 'Group created Successfully', + 'group_already_exists' => 'Group name already taken', + 'group_update_successful' => 'Group details updated', + 'group_delete_successful' => 'Group deleted', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Account Activation', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Please click this link to %s.', + 'emailActivate_link' => 'Activate Your Account', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Forgotten Password Verification', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', + +]; diff --git a/Language/es/Auth.php b/Language/es/Auth.php new file mode 100644 index 000000000..1b55045fb --- /dev/null +++ b/Language/es/Auth.php @@ -0,0 +1,155 @@ + 'Este formulario no pasó nuestras pruebas de seguridad.', + + // Login + 'login_heading' => 'Ingresar', + 'login_subheading' => 'Por favor, introduce tu email/usuario y contraseña.', + 'login_identity_label' => 'Email/Usuario:', + 'login_password_label' => 'Contraseña:', + 'login_remember_label' => 'Recuérdame:', + 'login_submit_btn' => 'Ingresar', + 'login_forgot_password' => '¿Has olvidado tu contraseña?', + + // Index + 'index_heading' => 'Usuarios', + 'index_subheading' => 'Debajo está la lista de usuarios.', + 'index_fname_th' => 'Nombre', + 'index_lname_th' => 'Apellidos', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Grupos', + 'index_status_th' => 'Estado', + 'index_action_th' => 'Acción', + 'index_active_link' => 'Activo', + 'index_inactive_link' => 'Inactivo', + 'index_create_user_link' => 'Crear nuevo usuario', + 'index_create_group_link' => 'Crear nuevo grupo', + + // Deactivate User + 'deactivate_heading' => 'Desactivar usuario', + 'deactivate_subheading' => '¿Estás seguro que quieres desactivar el usuario \'%s\'', + 'deactivate_confirm_y_label' => 'Sí:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Enviar', + 'deactivate_validation_confirm_label' => 'confirmación', + 'deactivate_validation_user_id_label' => 'ID de usuario', + + // Create User + 'create_user_heading' => 'Crear Usuario', + 'create_user_subheading' => 'Por favor, introduzce la información del usuario.', + 'create_user_fname_label' => 'Nombre:', + 'create_user_lname_label' => 'Apellidos:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Compañía:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Teléfono:', + 'create_user_password_label' => 'Contraseña:', + 'create_user_password_confirm_label' => 'Confirmar contraseña:', + 'create_user_submit_btn' => 'Crear Usuario', + 'create_user_validation_fname_label' => 'Nombre', + 'create_user_validation_lname_label' => 'Apellidos', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Correo electrónico', + 'create_user_validation_phone_label' => 'Teléfono', + 'create_user_validation_company_label' => 'Nombre de la compañía', + 'create_user_validation_password_label' => 'Contraseña', + 'create_user_validation_password_confirm_label' => 'Confirmación de contraseña', + + // Edit User + 'edit_user_heading' => 'Editar Usuario', + 'edit_user_subheading' => 'Por favor introduzca la nueva información del usuario.', + 'edit_user_fname_label' => 'Nombre:', + 'edit_user_lname_label' => 'Apellidos:', + 'edit_user_company_label' => 'Compañía:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Teléfono:', + 'edit_user_password_label' => 'Contraseña: (si quieres cambiarla)', + 'edit_user_password_confirm_label' => 'Confirmar contraseña: (si quieres cambiarla)', + 'edit_user_groups_heading' => 'Miembro de grupos', + 'edit_user_submit_btn' => 'Guardar Usuario', + 'edit_user_validation_fname_label' => 'Nombre', + 'edit_user_validation_lname_label' => 'Apellidos', + 'edit_user_validation_email_label' => 'Correo electrónico', + 'edit_user_validation_phone_label' => 'Teléfono', + 'edit_user_validation_company_label' => 'Compañía', + 'edit_user_validation_groups_label' => 'Grupos', + 'edit_user_validation_password_label' => 'Contraseña', + 'edit_user_validation_password_confirm_label' => 'Confirmación de contraseña', + + // Create Group + 'create_group_title' => 'Crear Grupo', + 'create_group_heading' => 'Crear Grupo', + 'create_group_subheading' => 'Por favor introduce la información del grupo.', + 'create_group_name_label' => 'Nombre de Grupo:', + 'create_group_desc_label' => 'Descripción:', + 'create_group_submit_btn' => 'Crear Grupo', + 'create_group_validation_name_label' => 'Nombre de Grupo', + 'create_group_validation_desc_label' => 'Descripcion', + + // Edit Group + 'edit_group_title' => 'Editar Grupo', + 'edit_group_saved' => 'Grupo Guardado', + 'edit_group_heading' => 'Editar Grupo', + 'edit_group_subheading' => 'Por favor, registra la informacion del grupo.', + 'edit_group_name_label' => 'Nombre de Grupo:', + 'edit_group_desc_label' => 'Descripción:', + 'edit_group_submit_btn' => 'Guardar Grupo', + 'edit_group_validation_name_label' => 'Nombre de Grupo', + 'edit_group_validation_desc_label' => 'Descripción', + + // Change Password + 'change_password_heading' => 'Cambiar Contraseña', + 'change_password_old_password_label' => 'Antigua Contraseña:', + 'change_password_new_password_label' => 'Nueva Contraseña (de al menos %s caracteres de longitud):', + 'change_password_new_password_confirm_label' => 'Confirmar Nueva Contraseña:', + 'change_password_submit_btn' => 'Cambiar', + 'change_password_validation_old_password_label' => 'Antigua Contraseña', + 'change_password_validation_new_password_label' => 'Nueva Contraseña', + 'change_password_validation_new_password_confirm_label' => 'Confirmar Nueva Contraseña', + + // Forgot Password + 'forgot_password_heading' => 'He olvidado mi Contraseña', + 'forgot_password_subheading' => 'Por favor, introduce tu %s para que podamos enviarte un email para restablecer tu contraseña.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Enviar', + 'forgot_password_validation_email_label' => 'Correo Electrónico', + 'forgot_password_username_identity_label' => 'Usuario', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'El correo electrónico no existe.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Cambiar Contraseña', + 'reset_password_new_password_label' => 'Nueva Contraseña (de al menos %s caracteres de longitud):', + 'reset_password_new_password_confirm_label' => 'Confirmar Nueva Contraseña:', + 'reset_password_submit_btn' => 'Guardar', + 'reset_password_validation_new_password_label' => 'Nueva Contraseña', + 'reset_password_validation_new_password_confirm_label' => 'Confirmar Nueva Contraseña', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Reestablecer contraseña para %s', + 'emailForgotPassword_subheading' => 'Por favor ingresa en este link para %s.', + 'emailForgotPassword_link' => 'Restablecer Tu Contraseña', +]; diff --git a/Language/es/IonAuth.php b/Language/es/IonAuth.php new file mode 100644 index 000000000..d86c52674 --- /dev/null +++ b/Language/es/IonAuth.php @@ -0,0 +1,75 @@ + 'Cuenta creada con éxito', + 'account_creation_unsuccessful' => 'No se ha podido crear la cuenta', + 'account_creation_duplicate_email' => 'Email en uso o inválido', + 'account_creation_duplicate_identity' => 'Nombre de usuario en uso o inválido', + 'account_creation_missing_defaultGroup' => 'No se ha especificado grupo por defecto', + 'account_creation_invalid_defaultGroup' => 'Nombre de grupo no válido', + + // Password + 'password_change_successful' => 'Contraseña renovada con éxito', + 'password_change_unsuccessful' => 'No se ha podido cambiar la contraseña', + 'forgot_password_successful' => 'Nueva contraseña enviada por email', + 'forgot_password_unsuccessful' => 'No se ha podido crear una nueva contraseña', + + // Activation + 'activate_successful' => 'Cuenta activada con éxito', + 'activate_unsuccessful' => 'No se ha podido activar la cuenta', + 'deactivate_successful' => 'Cuenta desactivada con éxito', + 'deactivate_unsuccessful' => 'No se ha podido desactivar la cuenta', + 'activation_email_successful' => 'Email de activación enviado', + 'activation_email_unsuccessful' => 'No se ha podido enviar el email de activación', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Sesión iniciada con éxito', + 'login_unsuccessful' => 'No se ha podido iniciar sesión', + 'login_unsuccessful_not_active' => 'Cuenta inactiva', + 'login_timeout' => 'Temporalmente bloqueado. Vuelva a intentarlo luego.', + 'logout_successful' => 'Sesión finalizada con éxito', + + // Account Changes + 'update_successful' => 'Información de la cuenta actualizada con éxito', + 'update_unsuccessful' => 'No se ha podido actualizar la información de la cuenta', + 'delete_successful' => 'Usuario eliminado', + 'delete_unsuccessful' => 'No se ha podido eliminar el usuario', + + // Groups + 'group_creation_successful' => 'Grupo creado', + 'group_already_exists' => 'Nombre de grupo en uso', + 'group_update_successful' => 'Grupo actualizado', + 'group_delete_successful' => 'Grupo borrado', + 'group_delete_unsuccessful' => 'Imposible borrar grupo', + 'group_delete_notallowed' => 'No se puede borrar el grupo de administradores', + 'group_name_required' => 'Se requiere un nombre de grupo', + 'group_name_admin_not_alter' => 'El nombre del grupo de administradores no puede ser modificado', + + // Activation Email + 'emailActivation_subject' => 'Activación de la cuenta', + 'emailActivate_heading' => 'Cuenta activada para %s', + 'emailActivate_subheading' => 'Por favor, haga click en este link para %s.', + 'emailActivate_link' => 'Activa tu cuenta', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Verificación de contraseña olvidada', + 'emailForgotPassword_heading' => 'Resetea contraseña para %s', + 'emailForgotPassword_subheading' => 'Por favor, haga click en este link para %s.', + 'emailForgotPassword_link' => 'Resetea tu contraseña', +]; diff --git a/Language/et/Auth.php b/Language/et/Auth.php new file mode 100644 index 000000000..66985fefc --- /dev/null +++ b/Language/et/Auth.php @@ -0,0 +1,152 @@ + 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Please login with your email/username and password below.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Remember Me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Forgot your password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Below is a list of the users.', + 'index_fname_th' => 'First Name', + 'index_lname_th' => 'Last Name', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groups', + 'index_status_th' => 'Status', + 'index_action_th' => 'Action', + 'index_active_link' => 'Active', + 'index_inactive_link' => 'Inactive', + 'index_create_user_link' => 'Create a new user', + 'index_create_group_link' => 'Create a new group', + + // Deactivate User + 'deactivate_heading' => 'Deactivate User', + 'deactivate_subheading' => 'Are you sure you want to deactivate the user \'%s\'', + 'deactivate_confirm_y_label' => 'Yes:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Submit', + 'deactivate_validation_confirm_label' => 'confirmation', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Create User', + 'create_user_subheading' => 'Please enter the users information below.', + 'create_user_fname_label' => 'First Name:', + 'create_user_lname_label' => 'Last Name:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Company Name:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Phone:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Confirm Password:', + 'create_user_submit_btn' => 'Create User', + 'create_user_validation_fname_label' => 'First Name', + 'create_user_validation_lname_label' => 'Last Name', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Company Name', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the users information below.', + 'edit_user_fname_label' => 'First Name:', + 'edit_user_lname_label' => 'Last Name:', + 'edit_user_company_label' => 'Company Name:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Password: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Password: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'First Name', + 'edit_user_validation_lname_label' => 'Last Name', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Phone', + 'edit_user_validation_company_label' => 'Company Name', + 'edit_user_validation_groups_label' => 'Groups', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Create Group + 'create_group_title' => 'Create Group', + 'create_group_heading' => 'Create Group', + 'create_group_subheading' => 'Please enter the group information below.', + 'create_group_name_label' => 'Group Name:', + 'create_group_desc_label' => 'Description:', + 'create_group_submit_btn' => 'Create Group', + 'create_group_validation_name_label' => 'Group Name', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Edit Group', + 'edit_group_saved' => 'Group Saved', + 'edit_group_heading' => 'Edit Group', + 'edit_group_subheading' => 'Please enter the group information below.', + 'edit_group_name_label' => 'Group Name:', + 'edit_group_desc_label' => 'Description:', + 'edit_group_submit_btn' => 'Save Group', + 'edit_group_validation_name_label' => 'Group Name', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Change Password', + 'change_password_old_password_label' => 'Old Password:', + 'change_password_new_password_label' => 'New Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'Confirm New Password:', + 'change_password_submit_btn' => 'Change', + 'change_password_validation_old_password_label' => 'Old Password', + 'change_password_validation_new_password_label' => 'New Password', + 'change_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Please enter your %s so we can send you an email to reset your password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_username_identity_label' => 'Username', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Change Password', + 'reset_password_new_password_label' => 'New Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'Confirm New Password:', + 'reset_password_submit_btn' => 'Change', + 'reset_password_validation_new_password_label' => 'New Password', + 'reset_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/et/IonAuth.php b/Language/et/IonAuth.php new file mode 100644 index 000000000..4bdac30d2 --- /dev/null +++ b/Language/et/IonAuth.php @@ -0,0 +1,77 @@ + 'Konto on loodud', + 'account_creation_unsuccessful' => 'Konto loomine ebaõnnestus', + 'account_creation_duplicate_email' => 'E-posti aadress on juba kasutusel või vigane.', + 'account_creation_duplicate_identity' => 'Kasutajanimi on juba kasutusel või vigane.', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + + // Password + 'password_change_successful' => 'Salasõna on muudetud.', + 'password_change_unsuccessful' => 'Salasõna muutmine ebaõnnestus.', + 'forgot_password_successful' => 'Sinu e-postile saadeti kiri edasise juhendiga.', + 'forgot_password_unsuccessful' => 'Salasõna muutmine ebaõnnestus.', + + // Activation + 'activate_successful' => 'Konto on aktiveeritud', + 'activate_unsuccessful' => 'Konto aktiveerimine ebaõnnestus.', + 'deactivate_successful' => 'Konto on taas aktiivne', + 'deactivate_unsuccessful' => 'Konto aktiveerimine ebaõnnestus.', + 'activation_email_successful' => 'Sinu e-postile saadeti kiri edasise juhendiga.', + 'activation_email_unsuccessful' => 'Aktiveerimiskirja saatmine ebaõnnestus.', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Oled sisse logitud', + 'login_unsuccessful' => 'Sisenemine ebaõnnestus.', + 'login_unsuccessful_not_active' => 'Account is inactive', + 'login_timeout' => 'Temporarily Locked Out. Try again later.', + 'logout_successful' => 'Oled välja logitud', + + // Account Changes + 'update_successful' => 'Sinu andmed on muudetud', + 'update_unsuccessful' => 'Andmete muutmine ebaõnnestus.', + 'delete_successful' => 'Kasutaja on eemaldatud', + 'delete_unsuccessful' => 'Kasutajat eemaldamine ebaõnnestus.', + + // Groups + 'group_creation_successful' => 'Group created Successfully', + 'group_already_exists' => 'Group name already taken', + 'group_update_successful' => 'Group details updated', + 'group_delete_successful' => 'Group deleted', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Account Activation', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Please click this link to %s.', + 'emailActivate_link' => 'Activate Your Account', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Forgotten Password Verification', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', + ]; diff --git a/Language/fa/Auth.php b/Language/fa/Auth.php new file mode 100644 index 000000000..645684158 --- /dev/null +++ b/Language/fa/Auth.php @@ -0,0 +1,148 @@ + 'لطفا از رفرش صفحه خودداری نمایید', + + // Login + 'login_heading' => 'ورود اعضا', + 'login_subheading' => 'لطفا با ایمیل و پسورد خود وارد شوید', + 'login_identity_label' => 'ایمیل', + 'login_password_label' => 'کلمه عبور', + 'login_remember_label' => 'مرا به خاطر بسپار', + 'login_submit_btn' => 'ورود', + 'login_forgot_password' => 'کلمه عبور خود را فراموش کرده اید؟', + + // Index + 'index_heading' => 'اعضا', + 'index_subheading' => 'لیست اعضا', + 'index_fname_th' => 'نام', + 'index_lname_th' => 'نام خانوادگی', + 'index_email_th' => 'ایمیل', + 'index_groups_th' => 'گروه', + 'index_status_th' => 'وضعیت', + 'index_action_th' => 'مدیریت', + 'index_active_link' => 'فعال', + 'index_inactive_link' => 'غیرفعال', + 'index_create_user_link' => 'ساخت یوزر جدید', + 'index_create_group_link' => 'ساخت گروه جدید', + + // Deactivate User + 'deactivate_heading' => 'غیر فعال کردن کاربر', + 'deactivate_subheading' => 'آیا از غیرفعال کردن مطمئن هستید \'%s\'', + 'deactivate_confirm_y_label' => 'بله', + 'deactivate_confirm_n_label' => 'خیر', + 'deactivate_submit_btn' => 'تایید', + 'deactivate_validation_confirm_label' => 'تاییدیه', + 'deactivate_validation_user_id_label' => 'آی دی کاربر', + + // Create User + 'create_user_heading' => 'ثبت نام جدید', + 'create_user_subheading' => 'لطفا مشخصات را وارد نمایید', + 'create_user_fname_label' => 'نام:', + 'create_user_lname_label' => 'نام خانوادگی:', + 'create_user_identity_label' => 'نام کاربری:', + 'create_user_company_label' => 'شرکت:', + 'create_user_email_label' => 'ایمیل:', + 'create_user_phone_label' => 'تلفن:', + 'create_user_password_label' => 'کلمه عبور:', + 'create_user_password_confirm_label' => 'تکرار کلمه عبور:', + 'create_user_submit_btn' => 'ساخت کاربر', + 'create_user_validation_fname_label' => 'نام', + 'create_user_validation_lname_label' => 'نام خانوادگی', + 'create_user_validation_identity_label' => 'نام کاربری', + 'create_user_validation_email_label' => 'ایمیل', + 'create_user_validation_phone_label' => 'تلفن', + 'create_user_validation_company_label' => 'نام شرکت', + 'create_user_validation_password_label' => 'کلمه عبور', + 'create_user_validation_password_confirm_label' => 'تکرار کلمه عبور', + + // Edit User + 'edit_user_heading' => 'ویرایش کاربر', + 'edit_user_subheading' => 'لطفا مشخصا را وارد نمایید:', + 'edit_user_fname_label' => 'نام:', + 'edit_user_lname_label' => 'نام خانوادگی:', + 'edit_user_company_label' => 'نام شرکت:', + 'edit_user_email_label' => 'ایمیل:', + 'edit_user_phone_label' => 'تلفن:', + 'edit_user_password_label' => 'کلمه عبور (در صورتی که قصد تغییر دارید):', + 'edit_user_password_confirm_label' => 'تکرار کلمه عبور (در صورتی که قصد تغییر دارید)', + 'edit_user_groups_heading' => 'عضو گروه', + 'edit_user_submit_btn' => 'ذخیره', + 'edit_user_validation_fname_label' => 'نام', + 'edit_user_validation_lname_label' => 'نام خانوادگی', + 'edit_user_validation_email_label' => 'ایمیل', + 'edit_user_validation_phone_label' => 'تلفن', + 'edit_user_validation_company_label' => 'نام شرکت', + 'edit_user_validation_groups_label' => 'گروه', + 'edit_user_validation_password_label' => 'کلمه عبور', + 'edit_user_validation_password_confirm_label' => 'تکرار کلمه عبور', + + // Create Group + 'create_group_title' => 'ساخت گروه', + 'create_group_heading' => 'ساخت گروه', + 'create_group_subheading' => 'لطفا مشخصات گروه را وارد نمایید', + 'create_group_name_label' => 'نام گروه:', + 'create_group_desc_label' => 'توضیحات:', + 'create_group_submit_btn' => 'ساخت گروه', + 'create_group_validation_name_label' => 'نام گروه', + 'create_group_validation_desc_label' => 'توضیحات', + + // Edit Group + 'edit_group_title' => 'ویرایش گروه', + 'edit_group_saved' => 'گروه ذخیره شد', + 'edit_group_heading' => 'ویرایش گروه', + 'edit_group_subheading' => 'لطفا مشخصات گروه را در ذیل وارد نمایید', + 'edit_group_name_label' => 'نام گروه:', + 'edit_group_desc_label' => 'توضیحات:', + 'edit_group_submit_btn' => 'ذخیره گروه', + 'edit_group_validation_name_label' => 'نام گروه', + 'edit_group_validation_desc_label' => 'توضیحات', + + // Change Password + 'change_password_heading' => 'اغییر کلمه عبور', + 'change_password_old_password_label' => 'کلمه عبور قبلی:', + 'change_password_new_password_label' => 'کلمه عبور جدید حداقل %s حررف:', + 'change_password_new_password_confirm_label' => 'تکرار کلمه عبور جدید', + 'change_password_submit_btn' => 'تغییر کلمه عبور', + 'change_password_validation_old_password_label' => 'کلمه عبور قبلی', + 'change_password_validation_new_password_label' => 'کلمه عبور جدید', + 'change_password_validation_new_password_confirm_label' => 'تایید کلمه عبور جدید', + + // Forgot Password + 'forgot_password_heading' => 'فراموشی کلمه عبور', + 'forgot_password_subheading' => 'لطفا %s خود را وارد نمایید تا ایمیل بازیابی برای شما ارسال شود', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'ارسال', + 'forgot_password_validation_email_label' => 'آدرس ایمیل', + 'forgot_password_username_identity_label' => 'نام کاربری', + 'forgot_password_email_identity_label' => 'ایمیل', + 'forgot_password_email_not_found' => 'اطلاعات یافت نشد', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'تغییر کلمه عبور', + 'reset_password_new_password_label' => 'کلمه عبور جدید حداقل %s حرف', + 'reset_password_new_password_confirm_label' => 'تایید کلمه عبور جدید', + 'reset_password_submit_btn' => 'تغییر کلمه عبور', + 'reset_password_validation_new_password_label' => 'کلمه عبور جدید', + 'reset_password_validation_new_password_confirm_label' => 'تایید کلمه عبور جدید', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'بازیابی کلمه عبور برای %s', + 'emailForgotPassword_subheading' => 'لطفا روی این لینک کلیک کنید %s', + 'emailForgotPassword_link' => 'کلمه عبور خود را بازیابی کنید', +]; diff --git a/Language/fa/IonAuth.php b/Language/fa/IonAuth.php new file mode 100644 index 000000000..556a2cb01 --- /dev/null +++ b/Language/fa/IonAuth.php @@ -0,0 +1,84 @@ + 'حساب کاربري با موفقیت ايجاد شد', + 'account_creation_unsuccessful' => 'ايجاد حساب کاربري با شكست مواجه شد', + 'account_creation_duplicate_email' => 'ایمیل قبلا استفاده شده است', + 'account_creation_duplicate_identity' => 'نام کاربری قبلا استفاده شده است', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'گروه پیش فرض ذخیره نشده است', + 'account_creation_invalid_defaultGroup' => 'گروه پیشفرض نامعتبر است', + + // Password + 'password_change_successful' => 'رمز عبور عوض شد', + 'password_change_unsuccessful' => 'تعويض رمز عبور انجام نشد', + 'forgot_password_successful' => 'ایمیل تعويض رمز عبور ارسال شد', + 'forgot_password_unsuccessful' => 'امكان تعويض رمز عبور وجود ندارد', + + // Activation + 'activate_successful' => 'حساب کاربري فعال شد', + 'activate_unsuccessful' => 'امكان فعال سازي حساب کاربري وجود ندارد', + 'deactivate_successful' => 'حساب کاربري غيرفعال شد', + 'deactivate_unsuccessful' => 'امكان غيرفعال كردن حساب کاربري وجود ندارد', + 'activation_email_successful' => 'ایمیل فعال سازی فرستاده شد', + 'activation_email_unsuccessful' => 'امكان ارسال ایمیل فعال سازی وجود ندارد', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'ورود موفقیت آميز', + 'login_unsuccessful' => 'ورود نا موفق', + 'login_unsuccessful_not_active' => 'حساب کاربري غیر فعال است', + 'login_timeout' => 'حساب کاربري موقتا قفل شده است، لطفا بعدا دوباره تلاش نماييد.', + 'logout_successful' => 'خروج موفقیت آميز', + + // Account Changes + 'update_successful' => 'اطلاعات حساب کاربري به روز شد', + 'update_unsuccessful' => 'اطلاعات حساب کاربري به روز نشد', + 'delete_successful' => 'کاربر حذف شد', + 'delete_unsuccessful' => 'امكان حذف کاربر وجود ندارد', + + // Groups + 'group_creation_successful' => 'گروه با موفقيت ايجاد شد', + 'group_already_exists' => 'اين نام گروه قبلا استفاده شده است', + 'group_update_successful' => 'جزئيات گروه با موفقيت بروز رساني شد', + 'group_delete_successful' => 'گروه حذف شد', + 'group_delete_unsuccessful' => 'امكان حذف گروه وجود ندارد', + 'group_delete_notallowed' => 'نمیتوان گروه مدیریت را پاک کرد', + 'group_name_required' => 'نام گروه لازم است', + 'group_name_admin_not_alter' => 'نام گروه ادمین را نمیتوان تغییر داد', + + // Activation Email + 'emailActivation_subject' => 'فعال سازی حساب کاربري', + 'emailActivate_heading' => 'فعال سازی اکانت %s', + 'emailActivate_subheading' => 'لطفا روی این لینک کلیک کنید: %s', + 'emailActivate_link' => 'فعال سازی اکانت', + // Forgot Password Email + 'email_forgotten_password_subject' => 'تایید رمز عبور جدید', + 'emailForgotPassword_heading' => 'بازیابی کلمه عبور برای %s', + 'emailForgotPassword_subheading' => 'لطفا روی این لینک کلیک کنید: %s', + 'emailForgotPassword_link' => 'کلمه عبور خود را بازیابی کنید', +]; diff --git a/Language/fi/Auth.php b/Language/fi/Auth.php new file mode 100644 index 000000000..66985fefc --- /dev/null +++ b/Language/fi/Auth.php @@ -0,0 +1,152 @@ + 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Please login with your email/username and password below.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Remember Me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Forgot your password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Below is a list of the users.', + 'index_fname_th' => 'First Name', + 'index_lname_th' => 'Last Name', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groups', + 'index_status_th' => 'Status', + 'index_action_th' => 'Action', + 'index_active_link' => 'Active', + 'index_inactive_link' => 'Inactive', + 'index_create_user_link' => 'Create a new user', + 'index_create_group_link' => 'Create a new group', + + // Deactivate User + 'deactivate_heading' => 'Deactivate User', + 'deactivate_subheading' => 'Are you sure you want to deactivate the user \'%s\'', + 'deactivate_confirm_y_label' => 'Yes:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Submit', + 'deactivate_validation_confirm_label' => 'confirmation', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Create User', + 'create_user_subheading' => 'Please enter the users information below.', + 'create_user_fname_label' => 'First Name:', + 'create_user_lname_label' => 'Last Name:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Company Name:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Phone:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Confirm Password:', + 'create_user_submit_btn' => 'Create User', + 'create_user_validation_fname_label' => 'First Name', + 'create_user_validation_lname_label' => 'Last Name', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Company Name', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the users information below.', + 'edit_user_fname_label' => 'First Name:', + 'edit_user_lname_label' => 'Last Name:', + 'edit_user_company_label' => 'Company Name:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Password: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Password: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'First Name', + 'edit_user_validation_lname_label' => 'Last Name', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Phone', + 'edit_user_validation_company_label' => 'Company Name', + 'edit_user_validation_groups_label' => 'Groups', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Create Group + 'create_group_title' => 'Create Group', + 'create_group_heading' => 'Create Group', + 'create_group_subheading' => 'Please enter the group information below.', + 'create_group_name_label' => 'Group Name:', + 'create_group_desc_label' => 'Description:', + 'create_group_submit_btn' => 'Create Group', + 'create_group_validation_name_label' => 'Group Name', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Edit Group', + 'edit_group_saved' => 'Group Saved', + 'edit_group_heading' => 'Edit Group', + 'edit_group_subheading' => 'Please enter the group information below.', + 'edit_group_name_label' => 'Group Name:', + 'edit_group_desc_label' => 'Description:', + 'edit_group_submit_btn' => 'Save Group', + 'edit_group_validation_name_label' => 'Group Name', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Change Password', + 'change_password_old_password_label' => 'Old Password:', + 'change_password_new_password_label' => 'New Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'Confirm New Password:', + 'change_password_submit_btn' => 'Change', + 'change_password_validation_old_password_label' => 'Old Password', + 'change_password_validation_new_password_label' => 'New Password', + 'change_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Please enter your %s so we can send you an email to reset your password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_username_identity_label' => 'Username', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Change Password', + 'reset_password_new_password_label' => 'New Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'Confirm New Password:', + 'reset_password_submit_btn' => 'Change', + 'reset_password_validation_new_password_label' => 'New Password', + 'reset_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/fi/IonAuth.php b/Language/fi/IonAuth.php new file mode 100755 index 000000000..959ebfe39 --- /dev/null +++ b/Language/fi/IonAuth.php @@ -0,0 +1,76 @@ + 'Tili luotiin onnistuneesti!', + 'account_creation_unsuccessful' => 'Tilin luonti epäonnistui', + 'account_creation_duplicate_email' => 'Sähköpostiosoite on virheellinen tai se on jo käytössä', + 'account_creation_duplicate_identity' => 'Tunnus on virheellinen tai se on jo käytössä', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + // Password + 'password_change_successful' => 'Salasana vaihdettu!', + 'password_change_unsuccessful' => 'Salasanan vaihto epäonnistui', + 'forgot_password_successful' => 'Salasanan resetointiohjeet lähetettiin sähköpostiin', + 'forgot_password_unsuccessful' => 'Salasanan resetointi epäonnistui', + + // Activation + 'activate_successful' => 'Tili aktivoitu!', + 'activate_unsuccessful' => 'Tilin aktivointi epäonnistui', + 'deactivate_successful' => 'Tili suljettu', + 'deactivate_unsuccessful' => 'Tilin sulkeminen epäonnistui', + 'activation_email_successful' => 'Aktivointiviesti lähetetty', + 'activation_email_unsuccessful' => 'Aktivointiviestiä ei voitu lähettää', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Olet nyt kirjautunut sisään!', + 'login_unsuccessful' => 'Kirjautuminen epäonnistui', + 'login_unsuccessful_not_active' => 'Tiliä ei aktivoitu', + 'login_timeout' => 'Väliaikaisesti suljettu. Yritä uudelleen myöhemmin.', + 'logout_successful' => 'Olet nyt kirjautunut ulos', + + // Account Changes + 'update_successful' => 'Tilin tiedot päivitetty!', + 'update_unsuccessful' => 'Tietojen päivitys epäonnistui', + 'delete_successful' => 'Tili poistettu', + 'delete_unsuccessful' => 'Tilin poisto epäonnistui', + + // Groups + 'group_creation_successful' => 'Ryhmä luotiin onnistuneesti!', + 'group_already_exists' => 'Ryhmän nimi jo käytössä', + 'group_update_successful' => 'Ryhmän tiedot päivitetty!', + 'group_delete_successful' => 'Ryhmä poistettu', + 'group_delete_unsuccessful' => 'Ryhmän poisto epäonnistui', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Ryhmän nimi tarvitaan', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Tilin aktivointi', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Please click this link to %s.', + 'emailActivate_link' => 'Activate Your Account', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Unohtuneen salasanan palautus', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/fil/Auth.php b/Language/fil/Auth.php new file mode 100644 index 000000000..3cb90d68f --- /dev/null +++ b/Language/fil/Auth.php @@ -0,0 +1,147 @@ + 'Ang form na ito post ay hindi pumasa sa aming mga pagsusuri ng seguridad.', + + // Login + 'login_heading' => 'Mag-login', + 'login_subheading' => 'Mangyaring mag-login sa iyong email/username at password sa ibaba.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Tandaan mo ako:', + 'login_submit_btn' => 'Mag-Login', + 'login_forgot_password' => 'Nakalimutan ang password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Sa ibaba ay isang listahan ng mga users.', + 'index_fname_th' => 'Pangalan', + 'index_lname_th' => 'Huling pangalan', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Gropo', + 'index_status_th' => 'katayuan', + 'index_action_th' => 'aksyon', + 'index_active_link' => 'aktibo', + 'index_inactive_link' => 'Hindi aktibo', + 'index_create_user_link' => 'Lumikha ng isang bagong user', + 'index_create_group_link' => 'Lumikha ng isang bagong grupo', + + // Deactivate User + 'deactivate_heading' => 'Huwag paganahin ang User', + 'deactivate_subheading' => 'Sigurado ka bang gusto mong i-deactivate ang user \'%s\'', + 'deactivate_confirm_y_label' => 'Oo:', + 'deactivate_confirm_n_label' => 'Hindi:', + 'deactivate_submit_btn' => 'Ipasa', + 'deactivate_validation_confirm_label' => 'pagpapatibay', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Lumikha User', + 'create_user_subheading' => 'Mangyaring ipasok ang impormasyon ng user sa ibaba.', + 'create_user_fname_label' => 'Pangalan:', + 'create_user_lname_label' => 'Huling pangalan:', + 'create_user_company_label' => 'Pangalan ng Kumpanya:', + 'create_user_identity_label' => 'Identity:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telepono:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'kumparahin ang Password:', + 'create_user_submit_btn' => 'Lumikha User', + 'create_user_validation_fname_label' => 'Pangalan', + 'create_user_validation_lname_label' => 'Huling pangalan', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Telepono', + 'create_user_validation_company_label' => 'Pangalan ng Kumpanya', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the user\'s information below.', + 'edit_user_fname_label' => 'Pangalan:', + 'edit_user_lname_label' => 'Huling pangalan:', + 'edit_user_company_label' => 'Pangalan ng Kumpanya:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telepono:', + 'edit_user_password_label' => 'Password: (kung ang pagbabago password)', + 'edit_user_password_confirm_label' => 'Kumpirmahin ang Password: (kung pagbabago ng password)', + 'edit_user_groups_heading' => 'Miyembro ng grupo', + 'edit_user_submit_btn' => 'I-save ang User', + 'edit_user_validation_fname_label' => 'Pangalan', + 'edit_user_validation_lname_label' => 'Huling pangalan', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Telepono', + 'edit_user_validation_company_label' => 'Pangalan ng Kumpanya', + 'edit_user_validation_groups_label' => 'Grupo', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Gumawa ng Grupo + 'create_group_title' => 'Gumawa ng Grupo', + 'create_group_heading' => 'Gumawa ng Grupo', + 'create_group_subheading' => 'Mangyaring ipasok ang impormasyon ng grupo sa ibaba.', + 'create_group_name_label' => 'Pangalan ng Grupo:', + 'create_group_desc_label' => 'Deskripsyon:', + 'create_group_submit_btn' => 'Gumawa ng Grupo', + 'create_group_validation_name_label' => 'Pangalan ng Grupo', + 'create_group_validation_desc_label' => 'Deskripsyon', + + // Baguhin ang Grupo + 'edit_group_title' => 'Baguhin ang Grupo', + 'edit_group_saved' => 'Group Nai-save na', + 'edit_group_heading' => 'Baguhin ang Grupo', + 'edit_group_subheading' => 'Mangyaring ipasok ang impormasyon ng grupo sa ibaba.', + 'edit_group_name_label' => 'Pangalan ng Grupo:', + 'edit_group_desc_label' => 'Deskripsyon:', + 'edit_group_submit_btn' => 'I-save ang Group', + 'edit_group_validation_name_label' => 'Pangalan ng Grupo', + 'edit_group_validation_desc_label' => 'Deskripsyon', + + // Palitan ang Password + 'change_password_heading' => 'Palitan ang Password', + 'change_password_old_password_label' => 'Lumang Password:', + 'change_password_new_password_label' => 'Bagong Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'kumparahin ang Bagong Password:', + 'change_password_submit_btn' => 'Palitan', + 'change_password_validation_old_password_label' => 'Lumang Password', + 'change_password_validation_new_password_label' => 'Bagong Password', + 'change_password_validation_new_password_confirm_label' => 'kumparahin ang Bagong Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Pakipasok ang iyong %s upang maaari naming ipasa sa iyong email ang mensahe upang i-reset ang iyong password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_identity_label' => 'Identity', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Walang record ng email address.', + 'forgot_password_identity_not_found' => 'Walang record ng username.', + + // Reset Password + 'reset_password_heading' => 'Palitan ang Password', + 'reset_password_new_password_label' => 'Bagong Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'kumparahin ang Bagong Password:', + 'reset_password_submit_btn' => 'Palitan', + 'reset_password_validation_new_password_label' => 'Bagong Password', + 'reset_password_validation_new_password_confirm_label' => 'kumparahin ang Bagong Password', +]; diff --git a/Language/fil/IonAuth.php b/Language/fil/IonAuth.php new file mode 100644 index 000000000..fbfeb876a --- /dev/null +++ b/Language/fil/IonAuth.php @@ -0,0 +1,76 @@ + 'Matagumpay na nagawa ang account', + 'account_creation_unsuccessful' => 'Hindi magawang i-Lumikha ng Account', + 'account_creation_duplicate_email' => 'Email ay Nagamit na o Hindi wastong', + 'account_creation_duplicate_identity' => 'Pagkakakilanlan ay Nagamit na o Hindi wastong', + 'account_creation_missing_defaultGroup' => 'Default na grupo ay hindi nakatakda', + 'account_creation_invalid_defaultGroup' => 'Hindi wasto ang default na ngalan ng grupo', + + + // Password + 'password_change_successful' => 'Password Matagumpay Binago', + 'password_change_unsuccessful' => 'Hindi ma-Baguhin ang Password', + 'forgot_password_successful' => 'Password Reset ay na-send na sa Email', + 'forgot_password_unsuccessful' => 'Hindi ma-reset ang Password', + + // Activation + 'activate_successful' => 'Account napagana na', + 'activate_unsuccessful' => 'Hindi ma-activate Account', + 'deactivate_successful' => 'Account De-Activated', + 'deactivate_unsuccessful' => 'Hindi ma-De-Activate Account', + 'activation_email_successful' => 'Activation Email Sent. Mangyaring suriin ang iyong inbox o spam', + 'activation_email_unsuccessful' => 'Hindi magawang Magpadala Activation Email', + 'deactivate_current_user_unsuccessful'=> 'Hindi mo Maaaring De-activate ang iyong sarili.', + + // Login / Logout + 'login_successful' => 'Tagumpay na Naka-Login', + 'login_unsuccessful' => 'Maling Login', + 'login_unsuccessful_not_active' => 'Account ay hindi aktibo', + 'login_timeout' => 'Pansamantalang Naka-lock Out. Subukan ulit mamaya.', + 'logout_successful' => 'Matagumpay na Naka-log Out', + + // Account Changes + 'update_successful' => 'Impormasyon ng Account Matagumpay Na-Bago', + 'update_unsuccessful' => 'Hindi ma-update ang Impormasyon ng Account', + 'delete_successful' => 'User Natanggal na', + 'delete_unsuccessful' => 'Hindi magawang alisin User', + + // Groups + 'group_creation_successful' => 'Matagumpay na Nalikha ang Grupo', + 'group_already_exists' => 'Ang pangalan ng grupo nagamit na', + 'group_update_successful' => 'Detalye sa Grupo Na-Bago na', + 'group_delete_successful' => 'Ang Grupo Na-Tanggal na', + 'group_delete_unsuccessful' => 'Hindi matanggal ang grupo', + 'group_delete_notallowed' => 'Hindi Maaaring tanggalin ang Grupo Administrator', + 'group_name_required' => 'Ang Ngalan sa Grupo ay Kailangan', + 'group_name_admin_not_alter' => 'Hndi Maaaring Palitan ang Ngalan sa Grupo', + + // Activation Email + 'emailActivation_subject' => 'Account Activation', + 'emailActivate_heading' => 'I-activate account para sa %s', + 'emailActivate_subheading' => 'Mangyaring i-click ang link na ito %s.', + 'emailActivate_link' => 'I-activate ang Iyong Account', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Nakalimutan mo ba ang Verification Password', + 'emailForgotPassword_heading' => 'I-reset ang Password para sa %s', + 'emailForgotPassword_subheading' => 'Mangyaring i-click ang link na ito %s.', + 'emailForgotPassword_link' => 'I-reset ang Iyong Password', +]; diff --git a/Language/fr/Auth.php b/Language/fr/Auth.php new file mode 100644 index 000000000..14b44f533 --- /dev/null +++ b/Language/fr/Auth.php @@ -0,0 +1,156 @@ + 'La validation de ce formulaire a échoué.', + + // Login + 'login_heading' => 'Se connecter', + 'login_subheading' => 'Veuillez vous connecter avec votre nom d\'utilisateur et votre mot de passe.', + 'login_identity_label' => 'E-mail/Nom d\'utilisateur :', + 'login_password_label' => 'Mot de passe :', + 'login_remember_label' => 'Rester connecté :', + 'login_submit_btn' => 'Se connecter', + 'login_forgot_password' => 'Mot de passe oublié ?', + + // Index + 'index_heading' => 'Utilisateurs', + 'index_subheading' => 'Ci-dessous se trouve la liste des utilisateurs.', + 'index_fname_th' => 'Prénom', + 'index_lname_th' => 'Nom', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groupes', + 'index_status_th' => 'Statut', + 'index_action_th' => 'Action', + 'index_active_link' => 'Activer', + 'index_inactive_link' => 'Désactiver', + 'index_create_user_link' => 'Créer un nouvel utilisateur', + 'index_create_group_link' => 'Créer un nouveau groupe', + + // Deactivate User + 'deactivate_heading' => 'Désactiver un utilisateur', + 'deactivate_subheading' => 'Êtes-vous certain de vouloir désactiver l\'utilisateur : %s', + 'deactivate_confirm_y_label' => 'Oui :', + 'deactivate_confirm_n_label' => 'Non :', + 'deactivate_submit_btn' => 'Envoyer', + 'deactivate_validation_confirm_label' => 'Confirmation', + 'deactivate_validation_user_id_label' => 'Identifiant', + + // Create User + 'create_user_heading' => 'Créer un utilisateur', + 'create_user_subheading' => 'Veuillez entrer les informations ci-dessous.', + 'create_user_fname_label' => 'Prénom :', + 'create_user_lname_label' => 'Nom :', + 'create_user_identity_label' => 'Identité :', + 'create_user_company_label' => 'Société :', + 'create_user_email_label' => 'Email :', + 'create_user_phone_label' => 'Téléphone :', + 'create_user_password_label' => 'Mot de passe :', + 'create_user_password_confirm_label' => 'Confirmer le mot de passe :', + 'create_user_submit_btn' => 'Créer l\'utilisateur', + 'create_user_validation_fname_label' => 'Prénom', + 'create_user_validation_lname_label' => 'Nom', + 'create_user_validation_identity_label' => 'Identité :', + 'create_user_validation_email_label' => 'Adresse Email', + 'create_user_validation_phone_label' => 'Téléphone', + 'create_user_validation_company_label' => 'Société', + 'create_user_validation_password_label' => 'Mot de passe', + 'create_user_validation_password_confirm_label' => 'Confirmation du mot de passe', + + // Edit User + 'edit_user_heading' => 'Éditer l\'utilisateur', + 'edit_user_subheading' => 'Veuillez entrer les données de l\'utilisateur ci-dessous.', + 'edit_user_fname_label' => 'Prénom :', + 'edit_user_lname_label' => 'Nom :', + 'edit_user_company_label' => 'Société :', + 'edit_user_email_label' => 'E-mail :', + 'edit_user_phone_label' => 'Téléphone :', + 'edit_user_password_label' => 'Mot de passe (si modifié) :', + 'edit_user_password_confirm_label' => 'Confirmer le mot de passe :', + 'edit_user_groups_heading' => 'Membre du groupe', + 'edit_user_submit_btn' => 'Enregistrer les modifications', + 'edit_user_validation_fname_label' => 'Prénom', + 'edit_user_validation_lname_label' => 'Nom', + 'edit_user_validation_email_label' => 'Adresse email', + 'edit_user_validation_phone_label' => 'Téléphone', + 'edit_user_validation_company_label' => 'Société', + 'edit_user_validation_groups_label' => 'Groupes', + 'edit_user_validation_password_label' => 'Mot de passe', + 'edit_user_validation_password_confirm_label' => 'Confirmation du Mot de passe', + + // Create Group + 'create_group_title' => 'Créer le Groupe', + 'create_group_heading' => 'Créer le Groupe', + 'create_group_subheading' => 'Veuillez entrer les informations du groupe ci-dessous.', + 'create_group_name_label' => 'Nom du groupe :', + 'create_group_desc_label' => 'Description :', + 'create_group_submit_btn' => 'Créer le Groupe', + 'create_group_validation_name_label' => 'Nom du Groupe', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Éditer le Groupe', + 'edit_group_saved' => 'Groupe enregistré', + 'edit_group_heading' => 'Éditer le Groupe', + 'edit_group_subheading' => 'Veuillez entrer les informations du groupe ci-dessous.', + 'edit_group_name_label' => 'Nom du Groupe :', + 'edit_group_desc_label' => 'Description :', + 'edit_group_submit_btn' => 'Enregister les mofifications', + 'edit_group_validation_name_label' => 'Nom du Groupe', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Changer le mot de passe', + 'change_password_old_password_label' => 'Ancien mot de passe :', + 'change_password_new_password_label' => 'Le nouveau mot de passe (doit contenir %s caractères minimum) :', + 'change_password_new_password_confirm_label' => 'Confirmer le nouveau mot de passe :', + 'change_password_submit_btn' => 'Enregistrer', + 'change_password_validation_old_password_label' => 'Ancien mot de passe', + 'change_password_validation_new_password_label' => 'Nouveau mot de passe', + 'change_password_validation_new_password_confirm_label' => 'Confirmer le nouveau mot de passe', + + // Forgot Password + 'forgot_password_heading' => 'Mot de passe oublié', + 'forgot_password_subheading' => 'Veuillez entrer votre %s pour que nous puissions vous envoyer votre nouveau mot de passe.', + 'forgot_password_email_label' => '%s :', + 'forgot_password_submit_btn' => 'Envoyer', + 'forgot_password_validation_email_label' => 'Adresse Email', + 'forgot_password_username_identity_label' => 'Nom d\'utilisateur', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Cette adresse email n\'est pas enregistrée chez nous.', + 'forgot_password_identity_not_found' => 'Ce nom d\'utilisateur n\'est pas enregistré chez nous.', + + // Reset Password + 'reset_password_heading' => 'Modifier le mot de passe', + 'reset_password_new_password_label' => 'Nouveau mot de passe (doit contenir %s caractères minimum) :', + 'reset_password_new_password_confirm_label' => 'Confirmez le nouveau mot de passe :', + 'reset_password_submit_btn' => 'Enregistrer', + 'reset_password_validation_new_password_label' => 'Nouveau mot de passe', + 'reset_password_validation_new_password_confirm_label' => 'Confirmer le nouveau mot de passe', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Changer le mot de passe pour %s', + 'emailForgotPassword_subheading' => 'Veuillez cliquer sur ce lien pour %s', + 'emailForgotPassword_link' => 'Changer votre mot de passe', +]; diff --git a/Language/fr/IonAuth.php b/Language/fr/IonAuth.php new file mode 100644 index 000000000..fd13e4cfc --- /dev/null +++ b/Language/fr/IonAuth.php @@ -0,0 +1,80 @@ + 'Compte créé avec succès', + 'account_creation_unsuccessful' => 'Impossible de créer le compte', + 'account_creation_duplicate_email' => 'Email déjà utilisé ou invalide', + 'account_creation_duplicate_identity' => 'Nom d\'utilisateur déjà utilisé ou invalide', + 'account_creation_missing_defaultGroup' => 'Le groupe par défaut n\'est pas configuré', + 'account_creation_invalid_defaultGroup' => 'Le nom du groupe par défaut n\'est pas valide', + + // Password + 'password_change_successful' => 'Le mot de passe a été changé avec succès', + 'password_change_unsuccessful' => 'Impossible de changer le mot de passe', + 'forgot_password_successful' => 'Mail de réinitialisation du mot de passe envoyé', + 'forgot_password_unsuccessful' => 'Impossible de réinitialiser le mot de passe', + + // Activation + 'activate_successful' => 'Compte activé', + 'activate_unsuccessful' => 'Impossible d\'activer le compte', + 'deactivate_successful' => 'Compte désactivé', + 'deactivate_unsuccessful' => 'Impossible de désactiver le compte', + 'activation_email_successful' => 'Email d\'activation envoyé avec succès', + 'activation_email_unsuccessful' => 'Impossible d\'envoyer l\'email d\'activation', + + // Login / Logout + 'login_successful' => 'Connecté avec succès', + 'login_unsuccessful' => 'Erreur lors de la connexion', + 'login_unsuccessful_not_active' => 'Ce compte est inactif', + 'login_timeout' => 'Compte temporairement bloqué suite à de trop nombreuses tentatives. Veuillez réessayer plus tard.', + 'logout_successful' => 'Déconnexion effectuée avec succès', + + // Account Changes + 'update_successful' => 'Compte utilisateur mis à jour avec succès', + 'update_unsuccessful' => 'Impossible de mettre à jour le compte utilisateur', + 'delete_successful' => 'Utilisateur supprimé', + 'delete_unsuccessful' => 'Impossible de supprimer l\'utilisateur', + 'deactivate_current_user_unsuccessful'=> 'Vous ne pouvez pas vous désactiver vous-même.', + + // Groups + 'group_creation_successful' => 'Groupe créé avec succès', + 'group_already_exists' => 'Nom du groupe déjà pris', + 'group_update_successful' => 'Informations sur le groupe mis à jour', + 'group_delete_successful' => 'Groupe supprimé', + 'group_delete_unsuccessful' => 'Impossible de supprimer le groupe', + 'group_delete_notallowed' => 'Le groupe Administrateur ne peut pas être supprimé', + 'group_name_required' => 'Le nom du groupe est un champ obligatoire', + 'group_name_admin_not_alter' => 'Le nom du groupe Admin ne peut pas être modifié', + + // Activation Email + 'emailActivation_subject' => 'Activation du compte', + 'emailActivate_heading' => 'Activer le compte pour %s', + 'emailActivate_subheading' => 'Veuillez cliquer sur le lien pour %s', + 'emailActivate_link' => 'Activez votre compte', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Mot de Passe Oublié - Vérification', + 'emailForgotPassword_heading' => 'Réinitialiser le mot de passe pour %s', + 'emailForgotPassword_subheading' => 'Veuillez cliquer sur ce lien pour %s.', + 'emailForgotPassword_link' => 'Réinitialiser votre mot de passe', +]; diff --git a/Language/hr/Auth.php b/Language/hr/Auth.php new file mode 100644 index 000000000..b4b69e49b --- /dev/null +++ b/Language/hr/Auth.php @@ -0,0 +1,155 @@ + 'Obrazac ne prolazi provjere.', + + // Login + 'login_heading' => 'Prijava', + 'login_subheading' => 'Prijavite se koristeći Vaš email/korisničko ime i lozinku.', + 'login_identity_label' => 'Email/Korisničko ime:', + 'login_password_label' => 'Lozinka:', + 'login_remember_label' => 'Zapamti me:', + 'login_submit_btn' => 'Prijava', + 'login_forgot_password' => 'Zaboravili ste lozinku?', + + // Index + 'index_heading' => 'Korisnici', + 'index_subheading' => 'Lista korisnika.', + 'index_fname_th' => 'Ime', + 'index_lname_th' => 'Prezime', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Grupa', + 'index_status_th' => 'Status', + 'index_action_th' => 'Akcija', + 'index_active_link' => 'Aktivan', + 'index_inactive_link' => 'Neaktivan', + 'index_create_user_link' => 'Kreiraj novog korisnika', + 'index_create_group_link' => 'Kreiraj novu grupu', + + // Deactivate User + 'deactivate_heading' => 'Deaktiviraj korisnika', + 'deactivate_subheading' => 'Da li ste sigurni da želite deaktivirati korisnika \'%s\'', + 'deactivate_confirm_y_label' => 'Da:', + 'deactivate_confirm_n_label' => 'Ne:', + 'deactivate_submit_btn' => 'Pošalji', + 'deactivate_validation_confirm_label' => 'potvrda', + 'deactivate_validation_user_id_label' => 'korisnički ID', + + // Create User + 'create_user_heading' => 'Kreiraj korisnika', + 'create_user_subheading' => 'Ispuni podatke o korisniku ispod.', + 'create_user_fname_label' => 'Ime:', + 'create_user_lname_label' => 'Prezime:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Kompanija:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telefon:', + 'create_user_password_label' => 'Lozinka:', + 'create_user_password_confirm_label' => 'Potvrda lozinke:', + 'create_user_submit_btn' => 'Kreiraj korisnika', + 'create_user_validation_fname_label' => 'Ime', + 'create_user_validation_lname_label' => 'Prezime', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email', + 'create_user_validation_phone_label' => 'Telefon', + 'create_user_validation_company_label' => 'Kompanija', + 'create_user_validation_password_label' => 'Lozinka', + 'create_user_validation_password_confirm_label' => 'Potvrda lozine', + + // Edit User + 'edit_user_heading' => 'Ažuriraj korisnika', + 'edit_user_subheading' => 'Ispuni podatke o korisniku ispod.', + 'edit_user_fname_label' => 'Ime:', + 'edit_user_lname_label' => 'Prezime:', + 'edit_user_company_label' => 'Kompanija:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telefon:', + 'edit_user_password_label' => 'Lozinka: (za novu lozinku)', + 'edit_user_password_confirm_label' => 'Potvrda lozinke: (za novu lozinku)', + 'edit_user_groups_heading' => 'Član grupa', + 'edit_user_submit_btn' => 'Spremi korisnika', + 'edit_user_validation_fname_label' => 'Ime', + 'edit_user_validation_lname_label' => 'Prezime', + 'edit_user_validation_email_label' => 'Email', + 'edit_user_validation_phone_label' => 'Telefon', + 'edit_user_validation_company_label' => 'Kompanija', + 'edit_user_validation_groups_label' => 'Grupa', + 'edit_user_validation_password_label' => 'Lozinka', + 'edit_user_validation_password_confirm_label' => 'Potvrda lozinke', + + // Create Group + 'create_group_title' => 'Kreiraj grupu', + 'create_group_heading' => 'Kreiraj grupu', + 'create_group_subheading' => 'Upišite podatke o grupi ispod.', + 'create_group_name_label' => 'Naziv:', + 'create_group_desc_label' => 'Opis:', + 'create_group_submit_btn' => 'Kreiraj grupu', + 'create_group_validation_name_label' => 'Naziv', + 'create_group_validation_desc_label' => 'Opis', + + // Edit Group + 'edit_group_title' => 'Ažuriraj grupu', + 'edit_group_saved' => 'Grupa spremljena', + 'edit_group_heading' => 'Ažuriraj grupu', + 'edit_group_subheading' => 'Upišite podatke o grupi ispod.', + 'edit_group_name_label' => 'Naziv:', + 'edit_group_desc_label' => 'Opis:', + 'edit_group_submit_btn' => 'Spremi grupu', + 'edit_group_validation_name_label' => 'Naziv', + 'edit_group_validation_desc_label' => 'Opis', + + // Change Password + 'change_password_heading' => 'Promjeni lozinku', + 'change_password_old_password_label' => 'Stara lozinka:', + 'change_password_new_password_label' => 'Nova lozinka (najmanje %s znakova):', + 'change_password_new_password_confirm_label' => 'Potvrda nove lozinke:', + 'change_password_submit_btn' => 'Promjeni', + 'change_password_validation_old_password_label' => 'Stara lozinka', + 'change_password_validation_new_password_label' => 'Nova lozinka', + 'change_password_validation_new_password_confirm_label' => 'Potvrda nove lozinke', + + // Forgot Password + 'forgot_password_heading' => 'Zaboravljena lozinka', + 'forgot_password_subheading' => 'Upišite %s nakon čega ćete dobiti email za poništavanje Vaše lozinke.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Pošalji', + 'forgot_password_validation_email_label' => 'Email', + 'forgot_password_username_identity_label' => 'Korisničko ime', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Promjena lozinke', + 'reset_password_new_password_label' => 'Nova lozinka (najmanje %s znakova):', + 'reset_password_new_password_confirm_label' => 'Potvrdi novu lozinku:', + 'reset_password_submit_btn' => 'Promjeni', + 'reset_password_validation_new_password_label' => 'Nova lozinka', + 'reset_password_validation_new_password_confirm_label' => 'Potvrdi novu lozinku', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Poništi lozinku za %s', + 'emailForgotPassword_subheading' => 'Klikni ovaj link za %s.', + 'emailForgotPassword_link' => 'Poništi lozinku', +]; diff --git a/Language/hr/IonAuth.php b/Language/hr/IonAuth.php new file mode 100644 index 000000000..32a1cc60e --- /dev/null +++ b/Language/hr/IonAuth.php @@ -0,0 +1,79 @@ + 'Račun je uspješno kreiran', + 'account_creation_unsuccessful' => 'Račun nije kreiran', + 'account_creation_duplicate_email' => 'Email je već iskorišten ili krivi', + 'account_creation_duplicate_identity' => 'Korisničko ime je već iskorišteno ili krivo', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + // Password + 'password_change_successful' => 'Lozinka uspješno promjenjena', + 'password_change_unsuccessful' => 'Lozinka nije promjenjena', + 'forgot_password_successful' => 'Email za poništenje lozinke je poslan', + 'forgot_password_unsuccessful' => 'lozinka nije poništena', + + // Activation + 'activate_successful' => 'Račun je aktiviran', + 'activate_unsuccessful' => 'Aktiviranje računa nije uspjelo', + 'deactivate_successful' => 'Račun je deaktiviran', + 'deactivate_unsuccessful' => 'De-aktivacija računa noje uspjela', + 'activation_email_successful' => 'Email za aktivaciju je poslan', + 'activation_email_unsuccessful' => 'Slanje mail za aktivaciju nije uspjelo', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Uspješno prijavljeni', + 'login_unsuccessful' => 'Prijava nije uspjela', + 'login_unsuccessful_not_active' => 'Račun nije aktivan', + 'login_timeout' => 'Temporarily Locked Out. Try again later.', + 'logout_successful' => 'Uspješno ste odjavljeni', + + // Account Changes + 'update_successful' => 'Podaci o računu uspješno su a≈æurirani', + 'update_unsuccessful' => 'Podaci o računu nisu ažurirani', + 'delete_successful' => 'Korisnik je obrisan', + 'delete_unsuccessful' => 'Brisanje korisnika nije uspjelo', + + // Groups + 'group_creation_successful' => 'Group created Successfully', + 'group_already_exists' => 'Group name already taken', + 'group_update_successful' => 'Group details updated', + 'group_delete_successful' => 'Group deleted', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Aktivacija računa', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Kliknite sljedeći link %s.', + 'emailActivate_link' => 'Aktivirajte Vaš račun', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Potvrda o zaboravljenoj lozinci', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/hu/Auth.php b/Language/hu/Auth.php new file mode 100644 index 000000000..c6b5f28bd --- /dev/null +++ b/Language/hu/Auth.php @@ -0,0 +1,145 @@ + 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Bejelentkezés', + 'login_subheading' => 'Az alábbi űrlapon jelentkezzen be e-mail címével/felhasználónevével és jelszavával.', + 'login_identity_label' => 'E-mail/Felhasználónév:', + 'login_password_label' => 'Jelszó:', + 'login_remember_label' => 'Emlékezz rám:', + 'login_submit_btn' => 'Belépés', + 'login_forgot_password' => 'Elfelejtette jelszavát?', + + // Index + 'index_heading' => 'Felhasználók', + 'index_subheading' => 'Lejjebb található a felhasználók listája.', + 'index_fname_th' => 'Keresztnév', + 'index_lname_th' => 'Vezetéknév', + 'index_email_th' => 'E-mail', + 'index_groups_th' => 'Csoportok', + 'index_status_th' => 'Státusz', + 'index_action_th' => 'Operáció', + 'index_active_link' => 'Aktív', + 'index_inactive_link' => 'Inaktív', + 'index_create_user_link' => 'Új felhasználó létrehozása', + 'index_create_group_link' => 'Új csoport létrehozása', + + // Deactivate User + 'deactivate_heading' => 'Felhasználó deaktiválása', + 'deactivate_subheading' => 'Biztos benne hogy deaktiválni akarja a felhasználót? \'%s\'', + 'deactivate_confirm_y_label' => 'Igen:', + 'deactivate_confirm_n_label' => 'Nem:', + 'deactivate_submit_btn' => 'Elküld', + 'deactivate_validation_confirm_label' => 'visszaigazolás', + 'deactivate_validation_user_id_label' => 'felhasználói ID', + + // Create User + 'create_user_heading' => 'Felhasználó létrehozása', + 'create_user_subheading' => 'Kérem adja meg a felhasználó adatait az alábbi űrlapon.', + 'create_user_fname_label' => 'Keresztnév:', + 'create_user_lname_label' => 'Vezetéknév:', + 'create_user_identity_label' => 'Felhasználónév:', + 'create_user_company_label' => 'Cég neve:', + 'create_user_email_label' => 'E-mail:', + 'create_user_phone_label' => 'Telefonszám:', + 'create_user_password_label' => 'Jelszó:', + 'create_user_password_confirm_label' => 'Jelszó megerősítése:', + 'create_user_submit_btn' => 'Felhasználó létrehozása', + 'create_user_validation_fname_label' => 'Keresztnév', + 'create_user_validation_lname_label' => 'Vezetéknév', + 'create_user_validation_identity_label' => 'Felhasználónév', + 'create_user_validation_email_label' => 'E-mail cím', + 'create_user_validation_phone_label' => 'Telefonszám', + 'create_user_validation_company_label' => 'Cég neve', + 'create_user_validation_password_label' => 'Jelszó', + 'create_user_validation_password_confirm_label' => 'Jelszó megerősítése', + + // Edit User + 'edit_user_heading' => 'Felhasználó szerkesztése', + 'edit_user_subheading' => 'Kérem adja meg a felhasználó adatait az alábbi űrlapon.', + 'edit_user_fname_label' => 'Keresztnév:', + 'edit_user_lname_label' => 'Vezetéknév:', + 'edit_user_company_label' => 'Cég neve:', + 'edit_user_email_label' => 'E-mail:', + 'edit_user_phone_label' => 'Telefonszám:', + 'edit_user_password_label' => 'Jelszó: (ha változik)', + 'edit_user_password_confirm_label' => 'Jelszó megerősítése: (ha változik)', + 'edit_user_groups_heading' => 'Csoportok', + 'edit_user_submit_btn' => 'Felhasználó mentése', + 'edit_user_validation_fname_label' => 'Keresztnév', + 'edit_user_validation_lname_label' => 'Vezetéknév', + 'edit_user_validation_email_label' => 'E-mail cím', + 'edit_user_validation_phone_label' => 'Telefonszám', + 'edit_user_validation_company_label' => 'Cég neve', + 'edit_user_validation_groups_label' => 'Csoportok', + 'edit_user_validation_password_label' => 'Jelszó', + 'edit_user_validation_password_confirm_label' => 'Jelszó megerősítése', + + // Create Group + 'create_group_title' => 'Csoport létrehozása', + 'create_group_heading' => 'Csoport létrehozása', + 'create_group_subheading' => 'Kérem adja meg a csoport adatait az alábbi űrlapon.', + 'create_group_name_label' => 'Csoport neve:', + 'create_group_desc_label' => 'Leírás:', + 'create_group_submit_btn' => 'Csoport létrehozása', + 'create_group_validation_name_label' => 'Csoport neve', + 'create_group_validation_desc_label' => 'Leírás', + + // Edit Group + 'edit_group_title' => 'Csoport szerkesztése', + 'edit_group_saved' => 'Csoport mentve', + 'edit_group_heading' => 'Csoport szerkesztése', + 'edit_group_subheading' => 'Kérem adja meg a csoport adatait az alábbi űrlapon.', + 'edit_group_name_label' => 'Csoport neve:', + 'edit_group_desc_label' => 'Leírás:', + 'edit_group_submit_btn' => 'Csoport mentése', + 'edit_group_validation_name_label' => 'Csoport neve', + 'edit_group_validation_desc_label' => 'Leírás', + + // Change Password + 'change_password_heading' => 'Jelszó változtatása', + 'change_password_old_password_label' => 'Régi jelszó:', + 'change_password_new_password_label' => 'Új jelszó (legalább %s karakter hosszúságú):', + 'change_password_new_password_confirm_label' => 'Új jelszó megerősítése:', + 'change_password_submit_btn' => 'Változtat', + 'change_password_validation_old_password_label' => 'Régi jelszó', + 'change_password_validation_new_password_label' => 'Új jelszó', + 'change_password_validation_new_password_confirm_label' => 'Új jelszó megerősítése', + + // Forgot Password + 'forgot_password_heading' => 'Elfelejtett jelszó', + 'forgot_password_subheading' => 'Kérem adja meg a(z) %sét, hogy egy e-mailt küldhessünk a jelszó beállítására.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Elküld', + 'forgot_password_validation_email_label' => 'E-mail cím', + 'forgot_password_username_identity_label' => 'Felhasználónév', + 'forgot_password_email_identity_label' => 'E-mail', + 'forgot_password_email_not_found' => 'Nem található ez az e-mail cím.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Jelszó változtatása', + 'reset_password_new_password_label' => 'Új jelszó (legalább %s karakter hosszúságú):', + 'reset_password_new_password_confirm_label' => 'Új jelszó megerősítése:', + 'reset_password_submit_btn' => 'Változtat', + 'reset_password_validation_new_password_label' => 'Új jelszó', + 'reset_password_validation_new_password_confirm_label' => 'Új jelszó megerősítése', +]; diff --git a/Language/hu/IonAuth.php b/Language/hu/IonAuth.php new file mode 100644 index 000000000..628ba82fb --- /dev/null +++ b/Language/hu/IonAuth.php @@ -0,0 +1,74 @@ + 'Felhasználói fiók sikeresen létrehozva', + 'account_creation_unsuccessful' => 'Nem lehet létrehozni a felhasználói fiókot', + 'account_creation_duplicate_email' => 'Az email cím használatban van vagy érvénytelen', + 'account_creation_duplicate_identity' => 'A felhasználó név használatban van vagy érvénytelen', + 'account_creation_missing_defaultGroup' => 'Alapértelmezett csoport nincs megadva', + 'account_creation_invalid_defaultGroup' => 'Érvénytelen alapértelmezett csoport név', + + // Password + 'password_change_successful' => 'A jelszó sikeresen megváltoztatva', + 'password_change_unsuccessful' => 'Nem lehet megváltoztatni a jelszót', + 'forgot_password_successful' => 'A jelszó törlő email elküldve', + 'forgot_password_unsuccessful' => 'Nem lehet törölni a jelszót', + + // Activation + 'activate_successful' => 'Felhasználói fiók aktiválva', + 'activate_unsuccessful' => 'Nem lehet a felhasználói fiókot aktiválni', + 'deactivate_successful' => 'Felhasználói fiók inaktiválva', + 'deactivate_unsuccessful' => 'Nem lehet a felhasználói fiókot inaktiválni', + 'activation_email_successful' => 'Aktivációs email elküldve', + 'activation_email_unsuccessful' => 'Nem lehet elküldeni az aktivációs emailt', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Sikeres bejelentkés', + 'login_unsuccessful' => 'Sikertelen bejelentkezés', + 'login_unsuccessful_not_active' => 'Felhasználói fiók inaktív', + 'login_timeout' => 'Ideiglenesen zárolva... Próbálja meg később.', + 'logout_successful' => 'Sikeres kijelentkezés', + + // Account Changes + 'update_successful' => 'Felhasználói fiók adatai sikeresen módosítva', + 'update_unsuccessful' => 'Nem lehet a felhasználói fiók adatait módosítani', + 'delete_successful' => 'Felhasználó törölve', + 'delete_unsuccessful' => 'Nem lehet a felhasználót törölni', + + // Groups + 'group_creation_successful' => 'Csoport sikeresen létrehozva', + 'group_already_exists' => 'A csoport már létezik', + 'group_update_successful' => 'Csoport adatai sikeresen módosítva', + 'group_delete_successful' => 'Csoport törölve', + 'group_delete_unsuccessful' => 'Nem lehet a csoportot törölni', + 'group_delete_notallowed' => 'Az adminisztrátorok csoport nem törölhető', + 'group_name_required' => 'A csoport neve kötelező mező', + 'group_name_admin_not_alter' => 'Az admin csoport neve nem változtatható meg', + + // Activation Email + 'emailActivation_subject' => 'Felhasználói fiók aktiválása', + 'emailActivate_heading' => '%s felhasználói fiókjának aktiválása', + 'emailActivate_subheading' => 'Kattintson a linkre, hogy %s.', + 'emailActivate_link' => 'Aktiválja felhasználói fiókját', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Elfelejtett jelszó visszaigazolása', + 'emailForgotPassword_heading' => 'Új jelszó beállítása %s számára', + 'emailForgotPassword_subheading' => 'Kattintson a linkre az %s érdekében.', + 'emailForgotPassword_link' => 'Új jelszó beállítása', +]; diff --git a/Language/id/Auth.php b/Language/id/Auth.php new file mode 100644 index 000000000..4f36e361a --- /dev/null +++ b/Language/id/Auth.php @@ -0,0 +1,148 @@ + 'Form yang dikirim tidak lulus pemeriksaan keamanan kami.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Silakan login dengan email/username dan password anda.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Kata Sandi:', + 'login_remember_label' => 'Ingatkan Saya:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Lupa Kata Sandi?', + + // Index + 'index_heading' => 'Pengguna', + 'index_subheading' => 'Di bawah ini list dari para Pengguna.', + 'index_fname_th' => 'Nama Awal', + 'index_lname_th' => 'Nama Akhir', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Grup', + 'index_status_th' => 'Status', + 'index_action_th' => 'Aksi', + 'index_active_link' => 'Aktif', + 'index_inactive_link' => 'Tidak Aktif', + 'index_create_user_link' => 'Buat Pengguna baru', + 'index_create_group_link' => 'Buat grup baru', + + // Deactivate User + 'deactivate_heading' => 'Deaktivasi Pengguna', + 'deactivate_subheading' => 'Anda yakin akan melakukan deaktivasi akun Pengguna \'%s\'', + 'deactivate_confirm_y_label' => 'Ya:', + 'deactivate_confirm_n_label' => 'Tidak:', + 'deactivate_submit_btn' => 'Kirim', + 'deactivate_validation_confirm_label' => 'konfirmasi', + 'deactivate_validation_user_id_label' => 'ID Pengguna', + + // Create User + 'create_user_heading' => 'Buat Pengguna', + 'create_user_subheading' => 'Silakan masukan informasi Pengguna di bawah ini.', + 'create_user_fname_label' => 'Nama Awal:', + 'create_user_lname_label' => 'Nama Akhir:', + 'create_user_company_label' => 'Nama Perusahaan:', + 'create_user_identity_label' => 'Identitas:', + 'create_user_email_label' => 'Surel:', + 'create_user_phone_label' => 'Telepon:', + 'create_user_password_label' => 'Kata Sandi:', + 'create_user_password_confirm_label' => 'Konfirmasi Kata Sandi:', + 'create_user_submit_btn' => 'Buat Pengguna', + 'create_user_validation_fname_label' => 'Nama Awal', + 'create_user_validation_lname_label' => 'Nama Akhir', + 'create_user_validation_identity_label' => 'Identitas', + 'create_user_validation_email_label' => 'Alamat Surel', + 'create_user_validation_phone_label' => 'Telepon', + 'create_user_validation_company_label' => 'Nama Perusahaan', + 'create_user_validation_password_label' => 'Kata Sandi', + 'create_user_validation_password_confirm_label' => 'Konfirmasi Kata Sandi', + + // Edit User + 'edit_user_heading' => 'Ubah Pengguna', + 'edit_user_subheading' => 'Silakan masukan informasi Pengguna di bawah ini.', + 'edit_user_fname_label' => 'Nama Awal:', + 'edit_user_lname_label' => 'Nama Akhir:', + 'edit_user_company_label' => 'Nama Perusahaan:', + 'edit_user_email_label' => 'Surel:', + 'edit_user_phone_label' => 'Telepon:', + 'edit_user_password_label' => 'Kata Sandi: (jika mengubah sandi)', + 'edit_user_password_confirm_label' => 'Konfirmasi Kata Sandi: (jika mengubah sandi)', + 'edit_user_groups_heading' => 'Anggota dari Grup', + 'edit_user_submit_btn' => 'Simpan Pengguna', + 'edit_user_validation_fname_label' => 'Nama Awal', + 'edit_user_validation_lname_label' => 'Nama Akhir', + 'edit_user_validation_email_label' => 'Alamat Surel', + 'edit_user_validation_phone_label' => 'Telepon', + 'edit_user_validation_company_label' => 'Nama Perusahaan', + 'edit_user_validation_groups_label' => 'Nama Grup', + 'edit_user_validation_password_label' => 'Kata Sandi', + 'edit_user_validation_password_confirm_label' => 'Konfirmasi Kata Sandi', + + // Create Group + 'create_group_title' => 'Buat Grup', + 'create_group_heading' => 'Buat Grupp', + 'create_group_subheading' => 'Silakan masukan detail Grup di bawah ini.', + 'create_group_name_label' => 'Nama Grup:', + 'create_group_desc_label' => 'Deskripsi:', + 'create_group_submit_btn' => 'Buat Grup', + 'create_group_validation_name_label' => 'Nama Grup', + 'create_group_validation_desc_label' => 'Deskripsi', + + // Edit Group + 'edit_group_title' => 'Ubah Grup', + 'edit_group_saved' => 'Grup Tersimpan', + 'edit_group_heading' => 'Ubah Grup', + 'edit_group_subheading' => 'Silakan masukan detail Grup di bawah ini.', + 'edit_group_name_label' => 'Nama Grup:', + 'edit_group_desc_label' => 'Deskripsi:', + 'edit_group_submit_btn' => 'Simpan Grup', + 'edit_group_validation_name_label' => 'Nama Grup', + 'edit_group_validation_desc_label' => 'Deskripsi', + + // Change Password + 'change_password_heading' => 'Ganti Kata Sandi', + 'change_password_old_password_label' => 'Kata Santi Lama:', + 'change_password_new_password_label' => 'Kata Sandi Baru (paling sedikit %s karakter):', + 'change_password_new_password_confirm_label' => 'Konfirmasi Kata Sandi:', + 'change_password_submit_btn' => 'Ubah', + 'change_password_validation_old_password_label' => 'Kata Sandi Lama', + 'change_password_validation_new_password_label' => 'Kata Sandi Baru', + 'change_password_validation_new_password_confirm_label' => 'Konfirmasi Kata Sandi Baru', + + // Forgot Password + 'forgot_password_heading' => 'Lupa Kata Sandi', + 'forgot_password_subheading' => 'Silakan masukkan %s anda, agar kami dapat mengirim surel untuk mereset Kata Sandi Anda.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Kirim', + 'forgot_password_validation_email_label' => 'Alamat Surel', + 'forgot_password_username_identity_label' => 'Nama Pengguna', + 'forgot_password_email_identity_label' => 'Surel', + 'forgot_password_email_not_found' => 'Tidak ada data dari surel tersebut.', + 'forgot_password_identity_not_found' => 'Tidak ada data dari nama pengguna tersebut.', + + // Reset Password + 'reset_password_heading' => 'Ganti Kata Sandi', + 'reset_password_new_password_label' => 'Kata Sandi Baru (paling sedikit %s karakter):', + 'reset_password_new_password_confirm_label' => 'Konfirmasi Kata Sandi:', + 'reset_password_submit_btn' => 'Ubah', + 'reset_password_validation_new_password_label' => 'Kata Sandi Baru', + 'reset_password_validation_new_password_confirm_label' => 'Konfirmasi Kata Sandi Baru', +]; diff --git a/Language/id/IonAuth.php b/Language/id/IonAuth.php new file mode 100644 index 000000000..79d864f94 --- /dev/null +++ b/Language/id/IonAuth.php @@ -0,0 +1,87 @@ + 'Akun Berhasil Dibuat', + 'account_creation_unsuccessful' => 'Tidak Dapat Membuat Akun', + 'account_creation_duplicate_email' => 'Email Sudah Digunakan atau Tidak Valid', + 'account_creation_duplicate_identity' => 'Identitas Sudah Digunakan atau Tidak Valid', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Standar grup tidak diatur', + 'account_creation_invalid_defaultGroup' => 'Pengaturan Nama Grup Standar Tidak Valid', + + + // Password + 'password_change_successful' => 'Kata Sandi Berhasil Diubah', + 'password_change_unsuccessful' => 'Tidak Dapat Mengganti Kata Sandi', + 'forgot_password_successful' => 'Email untuk Set Ulang Kata Sandi Telah Dikirim', + 'forgot_password_unsuccessful' => 'Tidak Dapat Set Ulang Kata Sandi', + + // Activation + 'activate_successful' => 'Akun Telah Diaktifkan', + 'activate_unsuccessful' => 'Tidak Dapat Mengaktifkan Akun', + 'deactivate_successful' => 'Akun Telah Dinonaktifkan', + 'deactivate_unsuccessful' => 'Tidak Dapat Menonaktifkan Akun', + 'activation_email_successful' => 'Email untuk Aktivasi Telah Dikirim. Silahkan cek inbox atau spam', + 'activation_email_unsuccessful' => 'Tidak Dapat Mengirimkan Email Aktivasi', + 'deactivate_current_user_unsuccessful' => 'Anda tidak dapat Nonaktifkan akun anda sendiri.', + + // Login / Logout + 'login_successful' => 'Log In Berhasil', + 'login_unsuccessful' => 'Log In Gagal', + 'login_unsuccessful_not_active' => 'Akun Tidak Aktif', + 'login_timeout' => 'Sementara Terkunci. Coba Beberapa Saat Lagi.', + 'logout_successful' => 'Log Out Berhasil', + + // Account Changes + 'update_successful' => 'Informasi Akun Berhasil Diperbaharui', + 'update_unsuccessful' => 'Gagal Memperbaharui Informasi Akun', + 'delete_successful' => 'Pengguna Telah Dihapus', + 'delete_unsuccessful' => 'Gagal Menghapus Pengguna', + + // Groups + 'group_creation_successful' => 'Grup Berhasil Dibuat', + 'group_already_exists' => 'Nama Grup Sudah Digunakan', + 'group_update_successful' => 'Rincian Grup Berhasil Diubah', + 'group_delete_successful' => 'Grup Berhasil Dihapus', + 'group_delete_unsuccessful' => 'Gagal Menghapus Grup', + 'group_delete_notallowed' => 'Tidak Dapat menghapus Grup Administrator', + 'group_name_required' => 'Nama Grup Tidak Boleh Kosong', + 'group_name_admin_not_alter' => 'Nama Grup Admin Tidak Bisa Diubah', + + // Activation Email + 'emailActivation_subject' => 'Aktivasi Akun', + 'emailActivate_heading' => 'Aktifkan Akun dari %s', + 'emailActivate_subheading' => 'Silahkan klik tautan berikut untuk %s.', + 'emailActivate_link' => 'Aktifkan Akun Anda', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Verifikasi Lupa Password', + 'emailForgotPassword_heading' => 'Setel Ulang Kata Sandi untuk %s', + 'emailForgotPassword_subheading' => 'Silahkan klik tautan berikut untuk %s.', + 'emailForgotPassword_link' => 'Setel Ulang Kata Sandi', +]; diff --git a/Language/it/Auth.php b/Language/it/Auth.php new file mode 100755 index 000000000..3fd4298f8 --- /dev/null +++ b/Language/it/Auth.php @@ -0,0 +1,156 @@ + 'Il form non ha superato i controlli di sicurezza', + + // Login + 'login_heading' => 'Accedi', + 'login_subheading' => 'Si prega di accedere tramite email/username e password', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Ricordami:', + 'login_submit_btn' => 'Accedi', + 'login_forgot_password' => 'Dimenticata la password?', + + // Index + 'index_heading' => 'Utenti', + 'index_subheading' => 'Qua sotto troverete una lista degli utenti.', + 'index_fname_th' => 'Nome', + 'index_lname_th' => 'Cognome', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Gruppi', + 'index_status_th' => 'Stato', + 'index_action_th' => 'Azione', + 'index_active_link' => 'Attivo', + 'index_inactive_link' => 'Disattivo', + 'index_create_user_link' => 'Crea un nuovo utente', + 'index_create_group_link' => 'Crea un nuovo gruppo', + + // Deactivate User + 'deactivate_heading' => 'Disattiva Utente', + 'deactivate_subheading' => 'Sei sicuro di voler attivare l\'utente \'%s\'', + 'deactivate_confirm_y_label' => 'Sì:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Invia', + 'deactivate_validation_confirm_label' => 'conferma', + 'deactivate_validation_user_id_label' => 'ID utente', + + // Create User + 'create_user_heading' => 'Crea l\'utente', + 'create_user_subheading' => 'Inserisci le informazioni sull\'utente qua sotto.', + 'create_user_fname_label' => 'Nome:', + 'create_user_lname_label' => 'Cognome:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Azienda:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telefono:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Conferma Password:', + 'create_user_submit_btn' => 'Crea Utente', + 'create_user_validation_fname_label' => 'Nome', + 'create_user_validation_lname_label' => 'Cognome', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Indirizzo Email', + 'create_user_validation_phone1_label' => 'Prima parte del Telefono', + 'create_user_validation_phone2_label' => 'Seconda parte del Telefono', + 'create_user_validation_phone3_label' => 'Terza parte del Telefono', + 'create_user_validation_company_label' => 'Azienda', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Conferma Password', + + // Edit User + 'edit_user_heading' => 'Modifica Utente', + 'edit_user_subheading' => 'Inserisci le informazioni sull\'utente qua sotto.', + 'edit_user_fname_label' => 'Nome:', + 'edit_user_lname_label' => 'Cognome:', + 'edit_user_company_label' => 'Azienda:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telefono:', + 'edit_user_password_label' => 'Password: (se la si vuole cambiare)', + 'edit_user_password_confirm_label' => 'Conferma Password: (se la si vuole cambiare)', + 'edit_user_groups_heading' => 'Appartenente ai gruppi', + 'edit_user_submit_btn' => 'Salva Utente', + 'edit_user_validation_fname_label' => 'Nome', + 'edit_user_validation_lname_label' => 'Cognome', + 'edit_user_validation_email_label' => 'Indirizzo Email', + 'edit_user_validation_phone1_label' => 'Prima parte del Telefono', + 'edit_user_validation_phone2_label' => 'Seconda parte del Telefono', + 'edit_user_validation_phone3_label' => 'Terza parte del Telefono', + 'edit_user_validation_company_label' => 'Azienda', + 'edit_user_validation_groups_label' => 'Gruppi', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Conferma Password', + + // Create Group + 'create_group_title' => 'Crea Gruppo', + 'create_group_heading' => 'Crea Gruppo', + 'create_group_subheading' => 'Inserisci le informazioni del gruppo qua sotto.', + 'create_group_name_label' => 'Nome Gruppo:', + 'create_group_desc_label' => 'Descrizione:', + 'create_group_submit_btn' => 'Crea Gruppo', + 'create_group_validation_name_label' => 'Nome Gruppo', + 'create_group_validation_desc_label' => 'Descrizione', + + // Edit Group + 'edit_group_title' => 'Modifica Gruppo', + 'edit_group_saved' => 'Gruppo Salvato', + 'edit_group_heading' => 'Modifica Gruppo', + 'edit_group_subheading' => 'Inserisci le informazioni del gruppo qua sotto.', + 'edit_group_name_label' => 'Nome Gruppo:', + 'edit_group_desc_label' => 'Descrizione:', + 'edit_group_submit_btn' => 'Salva Gruppo', + 'edit_group_validation_name_label' => 'Nome Gruppo', + 'edit_group_validation_desc_label' => 'Descrizione', + + // Change Password + 'change_password_heading' => 'Cambia Password', + 'change_password_old_password_label' => 'Vecchia Password:', + 'change_password_new_password_label' => 'Nuova Password (lunga almeno %s caratteri):', + 'change_password_new_password_confirm_label' => 'Conferma Nuova Password:', + 'change_password_submit_btn' => 'Cambia', + 'change_password_validation_old_password_label' => 'Vecchia Password', + 'change_password_validation_new_password_label' => 'Nuova Password', + 'change_password_validation_new_password_confirm_label' => 'Conferma Nuova Password', + + // Forgot Password + 'forgot_password_heading' => 'Password Dimenticata', + 'forgot_password_subheading' => 'Inserire la propria %s, vi verrà inviata una email per reimpostare la vostra password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Invia', + 'forgot_password_validation_email_label' => 'Indirizzo Email', + 'forgot_password_username_identity_label' => 'Username', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Indirizzo email non presente nel database.', + 'forgot_password_identity_not_found' => 'Nessuna registrazione per il nome utente.', + + // Reset Password + 'reset_password_heading' => 'Cambia Password', + 'reset_password_new_password_label' => 'Nuova Password (lunga almeno %s caratteri):', + 'reset_password_new_password_confirm_label' => 'Conferma Nuova Password:', + 'reset_password_submit_btn' => 'Cambia', + 'reset_password_validation_new_password_label' => 'Nuova Password', + 'reset_password_validation_new_password_confirm_label' => 'Conferma Nuova Password', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Reimposta la Password per %s', + 'emailForgotPassword_subheading' => 'Cliccare il seguente link per %s.', + 'emailForgotPassword_link' => 'Reimposta la tua Password', +]; diff --git a/Language/it/IonAuth.php b/Language/it/IonAuth.php new file mode 100755 index 000000000..61d05ba5a --- /dev/null +++ b/Language/it/IonAuth.php @@ -0,0 +1,75 @@ + 'Account creato con successo.', + 'account_creation_unsuccessful' => 'Impossibile creare l\'account.', + 'account_creation_duplicate_email' => 'Email già in uso o non valida.', + 'account_creation_duplicate_identity' => 'Nome utente già in uso o non valido.', + 'account_creation_missing_defaultGroup' => 'Gruppo predefinito non impostato', + 'account_creation_invalid_defaultGroup' => 'Nome del gruppo predefinito non valido', + + + // Password + 'password_change_successful' => 'Password modificata con successo.', + 'password_change_unsuccessful' => 'Impossibile modificare la password.', + 'forgot_password_successful' => 'Email di reset della password inviata.', + 'forgot_password_unsuccessful' => 'Impossibile resettare la password.', + + // Activation + 'activate_successful' => 'Account attivato.', + 'activate_unsuccessful' => 'Impossibile attivare l\'account.', + 'deactivate_successful' => 'Account disattivato.', + 'deactivate_unsuccessful' => 'Impossibile disattivare l\'account.', + 'activation_email_successful' => 'Email di attivazione inviata.', + 'activation_email_unsuccessful' => 'Impossibile inviare l\'email di attivazione.', + 'deactivate_current_user_unsuccessful'=> 'Non puoi disattivare te stesso.', + + // Login / Logout + 'login_successful' => 'Accesso effettuato con successo.', + 'login_unsuccessful' => 'Accesso non corretto.', + 'login_unsuccessful_not_active' => 'Account non attivo.', + 'login_timeout' => 'Temporaneamente bloccato. Riprovare più tardi.', + 'logout_successful' => 'Disconnessione effettuata con successo.', + + // Account Changes + 'update_successful' => 'Informazioni dell\'account aggiornate con successo.', + 'update_unsuccessful' => 'Impossibile aggiornare le informazioni dell\'account.', + 'delete_successful' => 'Utente eliminato.', + 'delete_unsuccessful' => 'Impossibile eliminare l\'utente.', + + // Groups + 'group_creation_successful' => 'Gruppo creato con successo', + 'group_already_exists' => 'Nome gruppo già assegnato', + 'group_update_successful' => 'Dettagli gruppo aggiornati', + 'group_delete_successful' => 'Gruppo cancellato', + 'group_delete_unsuccessful' => 'Impossibile cancellare il gruppo', + 'group_delete_notallowed' => 'Impossibile eliminare il gruppo amministratori', + 'group_name_required' => 'Il nome gruppo è un campo obbligatorio', + 'group_name_admin_not_alter' => 'Il nome del gruppo amministratori non può essere modificato', + + // Activation Email + 'emailActivation_subject' => 'Attivazione Account', + 'emailActivate_heading' => 'Attiva account per %s', + 'emailActivate_subheading' => 'Si prega di cliccare su questo collegamento per %s.', + 'emailActivate_link' => 'Attiva il tuo Account', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Verifica il cambio password dimenticata', + 'emailForgotPassword_heading' => 'Reimposta Password per %s', + 'emailForgotPassword_subheading' => 'Si prega di cliccare su questo collegamento per %s.', + 'emailForgotPassword_link' => 'Reimposta la tua Password', +]; diff --git a/Language/ja/Auth.php b/Language/ja/Auth.php new file mode 100644 index 000000000..2fd4c8434 --- /dev/null +++ b/Language/ja/Auth.php @@ -0,0 +1,156 @@ + 'セキュリティに問題が生じ送信できませんでした。', + + // Login + 'login_heading' => 'ログイン', + 'login_subheading' => 'メールアドレス又はユーザー名とパスワードでログインして下さい。', + 'login_identity_label' => 'メールアドレス又はユーザー名:', + 'login_password_label' => 'パスワード:', + 'login_remember_label' => '次回から自動的にログイン:', + 'login_submit_btn' => 'ログイン', + 'login_forgot_password' => 'パスワードを忘れましたか?', + + // Index + 'index_heading' => 'ユーザー', + 'index_subheading' => 'ユーザー一覧', + 'index_fname_th' => '名', + 'index_lname_th' => '姓', + 'index_email_th' => 'メールアドレス', + 'index_groups_th' => 'グループ', + 'index_status_th' => '状態', + 'index_action_th' => '操作', + 'index_active_link' => '有効', + 'index_inactive_link' => '無効', + 'index_create_user_link' => 'ユーザーの新規作成', + 'index_create_group_link' => 'グループの新規作成', + + // Deactivate User + 'deactivate_heading' => 'ユーザーの無効化', + 'deactivate_subheading' => '本当にユーザー「%s」を無効にしますか。', + 'deactivate_confirm_y_label' => 'はい:', + 'deactivate_confirm_n_label' => 'いいえ:', + 'deactivate_submit_btn' => '送信', + 'deactivate_validation_confirm_label' => '確認', + 'deactivate_validation_user_id_label' => 'ユーザーID', + + // Create User + 'create_user_heading' => 'ユーザーの作成', + 'create_user_subheading' => 'ユーザー情報を入力して下さい。', + 'create_user_fname_label' => '名:', + 'create_user_lname_label' => '姓:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => '会社名:', + 'create_user_email_label' => 'メールアドレス:', + 'create_user_phone_label' => '電話番号:', + 'create_user_password_label' => 'パスワード:', + 'create_user_password_confirm_label' => 'パスワード(確認用):', + 'create_user_submit_btn' => '作成', + 'create_user_validation_fname_label' => '名', + 'create_user_validation_lname_label' => '姓', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'メールアドレス', + 'create_user_validation_phone1_label' => '電話番号の第1部', + 'create_user_validation_phone2_label' => '電話番号の第2部', + 'create_user_validation_phone3_label' => '電話番号の第3部', + 'create_user_validation_company_label' => '会社名', + 'create_user_validation_password_label' => 'パスワード', + 'create_user_validation_password_confirm_label' => 'パスワードの確認', + + // Edit User + 'edit_user_heading' => 'ユーザーの編集', + 'edit_user_subheading' => 'ユーザー情報を入力して下さい。', + 'edit_user_fname_label' => '名:', + 'edit_user_lname_label' => '姓:', + 'edit_user_company_label' => '会社名:', + 'edit_user_email_label' => 'メールアドレス:', + 'edit_user_phone_label' => '電話番号::', + 'edit_user_password_label' => 'パスワード(パスワードを変更する場合のみ):', + 'edit_user_password_confirm_label' => 'パスワードの確認(パスワードを変更する場合のみ):', + 'edit_user_groups_heading' => '所属グループ', + 'edit_user_submit_btn' => '保存', + 'edit_user_validation_fname_label' => '名', + 'edit_user_validation_lname_label' => '姓', + 'edit_user_validation_email_label' => 'メールアドレス', + 'edit_user_validation_phone1_label' => '電話番号の第1部', + 'edit_user_validation_phone2_label' => '電話番号の第2部', + 'edit_user_validation_phone3_label' => '電話番号の第3部', + 'edit_user_validation_company_label' => '会社名', + 'edit_user_validation_groups_label' => 'グループ', + 'edit_user_validation_password_label' => 'パスワード', + 'edit_user_validation_password_confirm_label' => 'パスワードの確認', + + // Create Group + 'create_group_title' => 'グループの作成', + 'create_group_heading' => 'グループの作成', + 'create_group_subheading' => 'グループ情報を入力して下さい。', + 'create_group_name_label' => 'グループ名:', + 'create_group_desc_label' => '詳細:', + 'create_group_submit_btn' => '作成', + 'create_group_validation_name_label' => 'グループ名', + 'create_group_validation_desc_label' => '詳細', + + // Edit Group + 'edit_group_title' => 'グループの編集', + 'edit_group_saved' => '保存できました', + 'edit_group_heading' => 'グループの編集', + 'edit_group_subheading' => 'グループ情報を入力して下さい。', + 'edit_group_name_label' => 'グループ名:', + 'edit_group_desc_label' => '詳細:', + 'edit_group_submit_btn' => '保存', + 'edit_group_validation_name_label' => 'グループ名', + 'edit_group_validation_desc_label' => '詳細', + + // Change Password + 'change_password_heading' => 'パスワードの変更', + 'change_password_old_password_label' => '元のパスワード:', + 'change_password_new_password_label' => '新しいパスワード(少なくとも%s字以上):', + 'change_password_new_password_confirm_label' => '新しいパスワード(確認用):', + 'change_password_submit_btn' => '変更', + 'change_password_validation_old_password_label' => '元のパスワード', + 'change_password_validation_new_password_label' => '新しいパスワード', + 'change_password_validation_new_password_confirm_label' => '新しいパスワードの確認', + + // Forgot Password + 'forgot_password_heading' => 'パスワードの再発行', + 'forgot_password_subheading' => '新しいパスワードをメールで送信するため、%sを入力して下さい。', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => '送信', + 'forgot_password_validation_email_label' => 'メールアドレス', + 'forgot_password_username_identity_label' => 'ユーザー名', + 'forgot_password_email_identity_label' => 'メールアドレス', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'パスワードの変更', + 'reset_password_new_password_label' => '新しいパスワード(少なくとも%s字以上):', + 'reset_password_new_password_confirm_label' => '新しいパスワード(確認用):', + 'reset_password_submit_btn' => '変更', + 'reset_password_validation_new_password_label' => '新しいパスワード', + 'reset_password_validation_new_password_confirm_label' => '新しいパスワードの確認', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'パスワードのリセット: %s', + 'emailForgotPassword_subheading' => 'このリンクをクリックして%s。', + 'emailForgotPassword_link' => 'パスワードをリセットして下さい', +]; diff --git a/Language/ja/IonAuth.php b/Language/ja/IonAuth.php new file mode 100644 index 000000000..a002399e5 --- /dev/null +++ b/Language/ja/IonAuth.php @@ -0,0 +1,82 @@ + 'アカウントを作成しました', + 'account_creation_unsuccessful' => 'アカウントを作成することが出来ません', + 'account_creation_duplicate_email' => 'メールアドレスが登録済みまたは不正です', + 'account_creation_duplicate_identity' => 'ユーザー名が登録済みまたは不正です', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'デフォルトグループが設定されていません', + 'account_creation_invalid_defaultGroup' => 'デフォルトグループの名前が無効です', + + // Password + 'password_change_successful' => 'パスワードを変更しました', + 'password_change_unsuccessful' => 'パスワードを変更することが出来ません', + 'forgot_password_successful' => 'パスワード再設定メールを送信しました', + 'forgot_password_unsuccessful' => 'パスワードを再設定することが出来ません', + + // Activation + 'activate_successful' => 'アカウントを有効にしました', + 'activate_unsuccessful' => 'アカウントを有効にすることが出来ません', + 'deactivate_successful' => 'アカウントを無効にしました', + 'deactivate_unsuccessful' => 'アカウントを無効にすることが出来ません', + 'activation_email_successful' => 'アクティベーション・メールを送信しました', + 'activation_email_unsuccessful' => 'アクティベーション・メールを送信できません', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'ログインしました', + 'login_unsuccessful' => 'ログイン出来ません', + 'login_unsuccessful_not_active' => 'アカウントが無効です', + 'login_timeout' => 'アカウントが仮にロックされています。後でもう一度試してください', + 'logout_successful' => 'ログアウトしました', + + // Account Changes + 'update_successful' => 'アカウント情報を更新しました', + 'update_unsuccessful' => 'アカウント情報を更新することが出来ません', + 'delete_successful' => 'ユーザーを削除しました', + 'delete_unsuccessful' => 'ユーザーを削除することが出来ません', + + // Groups + 'group_creation_successful' => 'グループを作成しました', + 'group_already_exists' => 'このグループ名はすでに使われています', + 'group_update_successful' => 'グループ情報を更新しました', + 'group_delete_successful' => 'グループを削除しました', + 'group_delete_unsuccessful' => 'グループを削除することが出来ません', + 'group_delete_notallowed' => 'administratorsグループは削除できません', + 'group_name_required' => 'グループ名が必要です。', + 'group_name_admin_not_alter' => '管理者グループ名は変更できません', + + // Activation Email + 'emailActivation_subject' => 'アカウントの承認', + 'emailActivate_heading' => '%s アカウントを有効化します', + 'emailActivate_subheading' => 'このリンクをクリックして %s', + 'emailActivate_link' => 'アカウントを有効にして下さい', + // Forgot Password Email + 'email_forgotten_password_subject' => '忘れたパスワードの確認', + 'emailForgotPassword_heading' => '%s のパスワードのリセット', + 'emailForgotPassword_subheading' => 'こちらのリンクをクリックしてください。 %s', + 'emailForgotPassword_link' => 'パスワードのリセット', +]; diff --git a/Language/ko/Auth.php b/Language/ko/Auth.php new file mode 100644 index 000000000..8ec798b32 --- /dev/null +++ b/Language/ko/Auth.php @@ -0,0 +1,153 @@ + '폼 전송값이 보안 검사를 통과하지 못했습니다.', + + // Login + 'login_heading' => '로그인', + 'login_subheading' => '이메일이나 계정명으로 로그인 하세요.', + 'login_identity_label' => '이메일/계정명:', + 'login_password_label' => '비밀번호:', + 'login_remember_label' => '기억하기:', + 'login_submit_btn' => '로그인', + 'login_forgot_password' => '비밀번호를 잊으셨습니까?', + + // Index + 'index_heading' => '사용자', + 'index_subheading' => '사용자 목록입니다.', + 'index_fname_th' => '이름', + 'index_lname_th' => '성', + 'index_email_th' => '이메일', + 'index_groups_th' => '그룹', + 'index_status_th' => '상태', + 'index_action_th' => '활동', + 'index_active_link' => '활성화', + 'index_inactive_link' => '비활성화', + 'index_create_user_link' => '새 사용자를 만듭니다', + 'index_create_group_link' => '새 그룹을 만듭니다', + + // Deactivate User + 'deactivate_heading' => '사용자 비활성화', + 'deactivate_subheading' => '\'%s\' 사용자를 비활성화 하시겠습니까?', + 'deactivate_confirm_y_label' => '예:', + 'deactivate_confirm_n_label' => '아니요:', + 'deactivate_submit_btn' => '전송', + 'deactivate_validation_confirm_label' => '정보 확인', + 'deactivate_validation_user_id_label' => '사용자 ID', + + // Create User + 'create_user_heading' => '사용자 만들기', + 'create_user_subheading' => '사용자 정보를 입력해 주세요.', + 'create_user_fname_label' => '이름:', + 'create_user_lname_label' => '성:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => '회사명:', + 'create_user_email_label' => '이메일:', + 'create_user_phone_label' => '전화번호:', + 'create_user_password_label' => '비밀번호:', + 'create_user_password_confirm_label' => '비밀번호 재입력:', + 'create_user_submit_btn' => '사용자 만들기', + 'create_user_validation_fname_label' => '이름', + 'create_user_validation_lname_label' => '성', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => '이메일 주소', + 'create_user_validation_phone1_label' => '전화번호 앞자리', + 'create_user_validation_phone2_label' => '전화번호 중간자리', + 'create_user_validation_phone3_label' => '전화번호 마지막자리', + 'create_user_validation_company_label' => '회사명', + 'create_user_validation_password_label' => '비밀번호', + 'create_user_validation_password_confirm_label' => '비밀번호 재입력', + + // Edit User + 'edit_user_heading' => '사용자 정보 수정', + 'edit_user_subheading' => '사용자 정보를 입력해 주세요.', + 'edit_user_fname_label' => '이름:', + 'edit_user_lname_label' => '성:', + 'edit_user_company_label' => '회사명:', + 'edit_user_email_label' => '이메일:', + 'edit_user_phone_label' => '전화번호:', + 'edit_user_password_label' => '비밀번호: (바꾸려면 입력)', + 'edit_user_password_confirm_label' => '비밀번호 재입력: (바꾸려면 입력)', + 'edit_user_groups_heading' => '소속 그룹', + 'edit_user_submit_btn' => '정보 저장', + 'edit_user_validation_fname_label' => '이름', + 'edit_user_validation_lname_label' => '성', + 'edit_user_validation_email_label' => '이메일 주소', + 'edit_user_validation_phone1_label' => '전화번호 앞자리', + 'edit_user_validation_phone2_label' => '전화번호 중간자리', + 'edit_user_validation_phone3_label' => '전화번호 마지막자리', + 'edit_user_validation_company_label' => '회사명', + 'edit_user_validation_groups_label' => '그룹', + 'edit_user_validation_password_label' => '비밀번호', + 'edit_user_validation_password_confirm_label' => '비밀번호 입력', + + // Create Group + 'create_group_title' => '그룹 만들기', + 'create_group_heading' => '그룹 만들기', + 'create_group_subheading' => '그룹 정보를 입력하세요.', + 'create_group_name_label' => '그룹명:', + 'create_group_desc_label' => '설명:', + 'create_group_submit_btn' => '그룹 만들기', + 'create_group_validation_name_label' => '그룹명', + 'create_group_validation_desc_label' => '설명', + + // Edit Group + 'edit_group_title' => '그룹 정보 수정', + 'edit_group_saved' => '그룹이 저장되었습니다', + 'edit_group_heading' => '그룹 정보 수정', + 'edit_group_subheading' => '그룹 정보를 입력해 주세요.', + 'edit_group_name_label' => '그룹명:', + 'edit_group_desc_label' => '설명:', + 'edit_group_submit_btn' => '정보 저장', + 'edit_group_validation_name_label' => '그룹명', + 'edit_group_validation_desc_label' => '설명', + + // Change Password + 'change_password_heading' => '비밀번호 바꾸기', + 'change_password_old_password_label' => '옛 비밀번호:', + 'change_password_new_password_label' => '새 비밀번호 (최소 %s 자 이상):', + 'change_password_new_password_confirm_label' => '새 비밀번호 재입력:', + 'change_password_submit_btn' => '바꾸기', + 'change_password_validation_old_password_label' => '옛 비밀번호', + 'change_password_validation_new_password_label' => '새 비밀번호', + 'change_password_validation_new_password_confirm_label' => '새 비밀번호 재입력', + + // Forgot Password + 'forgot_password_heading' => '비밀번호 찾기', + 'forgot_password_subheading' => '비밀번호를 찾으려면 %s을 입력하세요. 재설정 방법을 보내드립니다.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => '보내기', + 'forgot_password_validation_email_label' => '이메일 주소', + 'forgot_password_username_identity_label' => '계정명', + 'forgot_password_email_identity_label' => '이메일', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => '비밀번호 바꾸기', + 'reset_password_new_password_label' => '새 비밀번호 (최소 %s 자 이상):', + 'reset_password_new_password_confirm_label' => '새 비밀번호 재입력:', + 'reset_password_submit_btn' => '바꾸기', + 'reset_password_validation_new_password_label' => '새 비밀번호', + 'reset_password_validation_new_password_confirm_label' => '새 비밀번호 재입력', + + // Forgot Password Email + 'emailForgotPassword_heading' => '%s 계정 비밀번호 변경', + 'emailForgotPassword_subheading' => '다음 링크를 클릭하여 %s로 접근해 주십시오.', + 'emailForgotPassword_link' => '비밀번호 변경', +]; diff --git a/Language/ko/IonAuth.php b/Language/ko/IonAuth.php new file mode 100644 index 000000000..f9d1a3f66 --- /dev/null +++ b/Language/ko/IonAuth.php @@ -0,0 +1,77 @@ + '계정을 만들었습니다', + 'account_creation_unsuccessful' => '계정을 만들 수 없습니다', + 'account_creation_duplicate_email' => '이 이메일은 사용중이거나 올바르지 않습니다', + 'account_creation_duplicate_identity' => '이 계정명은 사용중이거나 올바르지 않습니다', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + // Password + 'password_change_successful' => '비밀번호를 바꾸었습니다', + 'password_change_unsuccessful' => '비밀번호를 바꿀 수 없습니다', + 'forgot_password_successful' => '비밀번호 재설정 이메일을 보냈습니다', + 'forgot_password_unsuccessful' => '비밀번호를 재설정할 수 없습니다.', + + // Activation + 'activate_successful' => '계정을 활성화하였습니다', + 'activate_unsuccessful' => '계정을 활성화할 수 없습니다', + 'deactivate_successful' => '계정을 비활성화하였습니다', + 'deactivate_unsuccessful' => '계정을 비활성화할 수 없습니다', + 'activation_email_successful' => '계정 활성화 이메일을 보냈습니다', + 'activation_email_unsuccessful' => '계정 활성화 이메일을 보날 수 없습니다', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => '로그인 하였습니다', + 'login_unsuccessful' => '로그인할 수 없습니다', + 'login_unsuccessful_not_active' => '계정이 비활성화 되어 로그인할 수 없습니다', + 'login_timeout' => '계정이 잠시 잠긴 것 같습니다. 잠시 후에 다시 시도해 주세요.', + 'logout_successful' => '로그아웃을 하였습니다', + + // Account Changes + 'update_successful' => '계정 정보를 업데이트 하였습니다', + 'update_unsuccessful' => '계정 정보를 업데이트할 수 없습니다', + 'delete_successful' => '사용자를 삭제하였습니다', + 'delete_unsuccessful' => '사용자를 삭제할 수 없습니다', + + // Groups + 'group_creation_successful' => '그룹을 생성하였습니다', + 'group_already_exists' => '이미 사용 중인 그룹명입니다', + 'group_update_successful' => '그룹에 대한 세부 정보를 업데이트 하였습니다', + 'group_delete_successful' => '그룹을 삭제했습니다', + 'group_delete_unsuccessful' => '그룹을 삭제할 수 없습니다', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => '그룹 이름을 입력해 주십시오', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => '계정 활성화 방법을 보내드립니다', + 'emailActivate_heading' => '%s 계정 활성화', + 'emailActivate_subheading' => '다음 링크를 클릭하여 %s로 접근해 주십시오.', + 'emailActivate_link' => '계정 활성화', + + // Forgot Password Email + 'email_forgotten_password_subject' => '잊어버린 비밀번호를 찾는 절차를 보내드립니다', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/lt/Auth.php b/Language/lt/Auth.php new file mode 100644 index 000000000..4e1d2c276 --- /dev/null +++ b/Language/lt/Auth.php @@ -0,0 +1,154 @@ + 'Šis formos įrašas nepraėjo mūsų saugumo patikrų.', + + // Login + 'login_heading' => 'Prisijungimas', + 'login_subheading' => 'Prašome prisijungti įrašant el. pašto adresą arba prisijungimo vardą ir slaptažodį.', + 'login_identity_label' => 'El. pašto adresas / vartotojo vardas:', + 'login_password_label' => 'Slaptažodis:', + 'login_remember_label' => 'Atsiminti mane:', + 'login_submit_btn' => 'Prisijungti', + 'login_forgot_password' => 'Pamiršote slaptažodį?', + + // Index + 'index_heading' => 'Vartotojai', + 'index_subheading' => 'Žemiau pateikiamas vartotojų sąrašas.', + 'index_fname_th' => 'Vardas', + 'index_lname_th' => 'Pavardė', + 'index_email_th' => 'El. pašto adresas', + 'index_groups_th' => 'Grupės', + 'index_status_th' => 'Būsena', + 'index_action_th' => 'Veiksmas', + 'index_active_link' => 'Aktyvus', + 'index_inactive_link' => 'Neaktyvus', + 'index_create_user_link' => 'Sukurti naują vartotoją', + 'index_create_group_link' => 'Sukurti naują grupę', + + // Deactivate User + 'deactivate_heading' => 'Išjungti vartotoją', + 'deactivate_subheading' => 'Ar tikrai norite išjungti vartotoją \'%s\'', + 'deactivate_confirm_y_label' => 'Taip:', + 'deactivate_confirm_n_label' => 'Ne:', + 'deactivate_submit_btn' => 'Pateikti', + 'deactivate_validation_confirm_label' => 'patvirtinimas', + 'deactivate_validation_user_id_label' => 'vartotojo ID', + + // Create User + 'create_user_heading' => 'Sukurti vartotoją', + 'create_user_subheading' => 'Prašome įrašyti vartotojo informaciją.', + 'create_user_fname_label' => 'Vardas:', + 'create_user_lname_label' => 'Pavardė:', + 'create_user_identity_label' => 'Tapatybė:', + 'create_user_company_label' => 'Įmonė:', + 'create_user_email_label' => 'El. p. adresas:', + 'create_user_phone_label' => 'Telefonas:', + 'create_user_password_label' => 'Slaptažodis:', + 'create_user_password_confirm_label' => 'Patvirtinti slaptažodį:', + 'create_user_submit_btn' => 'Sukurti vartotoją', + 'create_user_validation_fname_label' => 'Vardas', + 'create_user_validation_lname_label' => 'Pavardė', + 'create_user_validation_identity_label' => 'Tapatybė', + 'create_user_validation_email_label' => 'El. p. adresas:', + 'create_user_validation_phone1_label' => 'Pirmoji telefono numerio dalis', + 'create_user_validation_phone2_label' => 'Antroji telefono numerio dalis', + 'create_user_validation_phone3_label' => 'Trečioji telefono numerio dalis', + 'create_user_validation_company_label' => 'Įmonės pavadinimas', + 'create_user_validation_password_label' => 'Slaptažodis', + 'create_user_validation_password_confirm_label' => 'Pakartokite slaptažodį', + + // Edit User + 'edit_user_heading' => 'Taisyti vartotojo duomenis', + 'edit_user_subheading' => 'Prašome įrašyti vartotojo informaciją.', + 'edit_user_fname_label' => 'Vardas:', + 'edit_user_lname_label' => 'Pavardė:', + 'edit_user_company_label' => 'Įmonės pavadinimas:', + 'edit_user_email_label' => 'El. p. adresas:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Slaptažodis: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Slaptažodis: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'Vardas', + 'edit_user_validation_lname_label' => 'Pavardė', + 'edit_user_validation_email_label' => 'El. p. adresas', + 'edit_user_validation_phone1_label' => 'Pirmoji telefono numerio dalis', + 'edit_user_validation_phone2_label' => 'Antroji telefono numerio dalis', + 'edit_user_validation_phone3_label' => 'Trečioji telefono numerio dalis', + 'edit_user_validation_company_label' => 'Įmonės pavadinimas', + 'edit_user_validation_groups_label' => 'Grupės', + 'edit_user_validation_password_label' => 'Slaptažodis', + 'edit_user_validation_password_confirm_label' => 'Pakartotinai įveskite slaptažodį', + + // Create Group + 'create_group_title' => 'Sukurti grupę', + 'create_group_heading' => 'Sukurti grupę', + 'create_group_subheading' => 'Prašome įrašyti grupės informaciją.', + 'create_group_name_label' => 'Grupės pavadinimas:', + 'create_group_desc_label' => 'Aprašymas:', + 'create_group_submit_btn' => 'Sukurti grupę', + 'create_group_validation_name_label' => 'Grupės pavadinimas', + 'create_group_validation_desc_label' => 'Aprašymas', + + // Edit Group + 'edit_group_title' => 'Keisti grupę', + 'edit_group_saved' => 'Grupė įrašyta', + 'edit_group_heading' => 'Keisti grupę', + 'edit_group_subheading' => 'Prašome įrašyti grupės informaciją.', + 'edit_group_name_label' => 'Grupės pavadinimas:', + 'edit_group_desc_label' => 'Aprašymas:', + 'edit_group_submit_btn' => 'Įrašyti grupę', + 'edit_group_validation_name_label' => 'Grupės pavadinimas', + 'edit_group_validation_desc_label' => 'Aprašymas', + + // Change Slaptažodis + 'change_password_heading' => 'Pakeisti slaptažodį', + 'change_password_old_password_label' => 'Senas slaptažodis:', + 'change_password_new_password_label' => 'Naujas slaptažodis (mažiausiai %s simbolių):', + 'change_password_new_password_confirm_label' => 'Patvirtinti naują slaptažodį:', + 'change_password_submit_btn' => 'Pakeisti', + 'change_password_validation_old_password_label' => 'Senas slaptažodis', + 'change_password_validation_new_password_label' => 'Naujas slaptažodis', + 'change_password_validation_new_password_confirm_label' => 'Patvirtinti naują slaptažodį', + + // Forgot password + 'forgot_password_heading' => 'Pamiršus slaptažodį', + 'forgot_password_subheading' => 'Prašome įrašyti savo %s kad galėtume išsiųsti Jums el. laišką slaptažodžio atkūrimui.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Pateikti', + 'forgot_password_validation_email_label' => 'El. p. adresas', + 'forgot_password_username_identity_label' => 'Vartotojo vardas', + 'forgot_password_email_identity_label' => 'El. p. adresas', + 'forgot_password_email_not_found' => 'Duomenų bazėje tokio el. pašto adreso nėra.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset password + 'reset_password_heading' => 'Pakeisti slaptažodį', + 'reset_password_new_password_label' => 'Naujas slaptažodis (mažiausiai %s simboliai/-ių):', + 'reset_password_new_password_confirm_label' => 'Patvirtinti naują slaptažodį:', + 'reset_password_submit_btn' => 'Keisti', + 'reset_password_validation_new_password_label' => 'Naujas slaptažodis', + 'reset_password_validation_new_password_confirm_label' => 'Patvirtinti naują slaptažodį', + + // Forgot Slaptažodis Email + 'emailForgotPassword_heading' => 'Iš naujo sugeneruoti %s slaptažodį', + 'emailForgotPassword_subheading' => 'Norėdami %s turite paspausti šią nuorodą.', + 'emailForgotPassword_link' => 'Sugeneruoti slaptažodį iš naujo', + + // New Slaptažodis Email +]; diff --git a/Language/lt/IonAuth.php b/Language/lt/IonAuth.php new file mode 100644 index 000000000..fb1296a18 --- /dev/null +++ b/Language/lt/IonAuth.php @@ -0,0 +1,79 @@ + 'Vartotojas sėkmingai sukurtas', + 'account_creation_unsuccessful' => 'Neįmanoma sukurti vartotojo', + 'account_creation_duplicate_email' => 'El, pašto adresas jau yra arba neteisingas', + 'account_creation_duplicate_identity' => 'Prisijungimo vardas jau yra arba nekorektiškas', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Nenustatyta numatytoji grupė', + 'account_creation_invalid_defaultGroup' => 'Nustatytas neteisingas numatytosios grupės pavadinimas', + + // Password + 'password_change_successful' => 'Slaptažodis sukurtas', + 'password_change_unsuccessful' => 'Negalima paeisti slaptažodžio', + 'forgot_password_successful' => 'Slaptažodis keičiamas. Instrukcijos išsiųstos paštu.', + 'forgot_password_unsuccessful' => 'Neįmanoma pakeisti slaptažodžio', + + // Activation + 'activate_successful' => 'Vartotojas aktyvuotas', + 'activate_unsuccessful' => 'Nepavyko aktyvuoti', + 'deactivate_successful' => 'Deaktyvuota', + 'deactivate_unsuccessful' => 'Neįmanoma deaktyvuoti', + 'activation_email_successful' => 'Išsiųstas pranešimas į el. paštą', + 'activation_email_unsuccessful' => 'Neįmanoma išsiųsti', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Sėkminga autorizacija', + 'login_unsuccessful' => 'Klaidingas prisijungimas', + 'login_unsuccessful_not_active' => 'Paskyra yra neaktyvi', + 'login_timeout' => 'Laikinai užrakinta. Pabandykite iš naujo vėliau.', + 'logout_successful' => 'Atsijungta sėkminga', + + // Account Changes + 'update_successful' => 'Vartotojo duomenys sėkmingai pakeisti', + 'update_unsuccessful' => 'Neįmanoma pakeisti vartotojo duoemnų', + 'delete_successful' => 'Vartotojas pašalintas', + 'delete_unsuccessful' => 'Neįmanoma pašalinti vartotojo', + + // Groups + 'group_creation_successful' => 'Grupė sėkmingai sukurta', + 'group_already_exists' => 'Grupės vardas jau naudojamas', + 'group_update_successful' => 'Grupės detalės atnaujintos', + 'group_delete_successful' => 'Grupė ištrinta', + 'group_delete_unsuccessful' => 'Nepavyksta ištrinti grupės', + 'group_delete_notallowed' => 'Administratorių grupės ištrinti negalima', + 'group_name_required' => 'Grupės vardą užpildyti būtina', + 'group_name_admin_not_alter' => 'Admin grupė negali būti pakeista', + + // Activation Email + 'emailActivation_subject' => 'Paskyros aktyvavimas', + 'emailActivate_heading' => 'Aktyvuoti %s paskyrą', + 'emailActivate_subheading' => 'Prašome spragtelėti %s nuorodą.', + 'emailActivate_link' => 'Aktyvuokite savo paskyrą', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Pamiršto slaptažodžio patvirtinimas', + 'emailForgotPassword_heading' => 'Iš naujo generuoti %s slaptažodį', + 'emailForgotPassword_subheading' => 'Prašome paspausti nuorodą norėdami %s.', + 'emailForgotPassword_link' => 'Perkrauti slaptažodį', +]; diff --git a/Language/nl/Auth.php b/Language/nl/Auth.php new file mode 100644 index 000000000..f51deeca2 --- /dev/null +++ b/Language/nl/Auth.php @@ -0,0 +1,156 @@ + 'Het CSRF token is verlopen of ongeldig.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Gebruikt uw e-mailadres/gebruikersnaam en wachtwoord om in te loggen.', + 'login_identity_label' => 'E-mail/Gebruikersnaam:', + 'login_password_label' => 'Wachtwoord:', + 'login_remember_label' => 'Onthoud mij:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Wachtwoord vergeten?', + + // Index + 'index_heading' => 'Gebruikers', + 'index_subheading' => 'Hieronder vindt u een lijst van de gebruikers.', + 'index_fname_th' => 'Voornaam', + 'index_lname_th' => 'Achternaam', + 'index_email_th' => 'E-mailadres', + 'index_groups_th' => 'Groepen', + 'index_status_th' => 'Status', + 'index_action_th' => 'Actie', + 'index_active_link' => 'Actief', + 'index_inactive_link' => 'Inactief', + 'index_create_user_link' => 'Nieuwe gebruiker aanmaken', + 'index_create_group_link' => 'Nieuwe groep aanmaken', + + // Deactivate User + 'deactivate_heading' => 'Gebruiker deactiveren', + 'deactivate_subheading' => 'Wilt u gebruiker \'%s\' deactiveren?', + 'deactivate_confirm_y_label' => 'Ja:', + 'deactivate_confirm_n_label' => 'Nee:', + 'deactivate_submit_btn' => 'Verzenden', + 'deactivate_validation_confirm_label' => 'bevestiging', + 'deactivate_validation_user_id_label' => 'Gebruikers ID', + + // Create User + 'create_user_heading' => 'Gebruiker aanmaken', + 'create_user_subheading' => 'Gelieve hieronder de gebruikersinformatie in te vullen.', + 'create_user_fname_label' => 'Voornaam:', + 'create_user_lname_label' => 'Achternaam:', + 'create_user_identity_label' => 'Identiteit:', + 'create_user_company_label' => 'Bedrijfsnaam:', + 'create_user_email_label' => 'E-mailadres:', + 'create_user_phone_label' => 'Telefoonnummer:', + 'create_user_password_label' => 'Wachtwoord:', + 'create_user_password_confirm_label' => 'Bevestig wachtwoord:', + 'create_user_submit_btn' => 'Gebruiker aanmaken', + 'create_user_validation_fname_label' => 'Voornaam', + 'create_user_validation_lname_label' => 'Achternaam', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'E-mailadres', + 'create_user_validation_phone1_label' => 'Eerste gedeelte telefoonnummer', + 'create_user_validation_phone2_label' => 'Tweede gedeelte telefoonnummer', + 'create_user_validation_phone3_label' => 'Derde gedeelte telefoonnummer', + 'create_user_validation_company_label' => 'Bedrijfsnaam', + 'create_user_validation_password_label' => 'Wachtwoord', + 'create_user_validation_password_confirm_label' => 'Wachtwoord bevestiging', + + // Edit User + 'edit_user_heading' => 'Gebruiker bewerken', + 'edit_user_subheading' => 'Gelieve hieronder de gebruikersinformatie in te vullen.', + 'edit_user_fname_label' => 'Voornaam:', + 'edit_user_lname_label' => 'Achternaam:', + 'edit_user_company_label' => 'Bedrijfsnaam:', + 'edit_user_email_label' => 'E-mailadres:', + 'edit_user_phone_label' => 'Telefoonnummer:', + 'edit_user_password_label' => 'Wachtwoord: (indien wijzigen)', + 'edit_user_password_confirm_label' => 'Bevestig wachtwoord: (indien wijzigen)', + 'edit_user_groups_heading' => 'Lid van groepen', + 'edit_user_submit_btn' => 'Gebruiker opslaan', + 'edit_user_validation_fname_label' => 'Voornaam', + 'edit_user_validation_lname_label' => 'Achternaam', + 'edit_user_validation_email_label' => 'E-mailadres', + 'edit_user_validation_phone1_label' => 'Eerste gedeelte telefoonnummer', + 'edit_user_validation_phone2_label' => 'Tweede gedeelte telefoonnummer', + 'edit_user_validation_phone3_label' => 'Derde gedeelte telefoonnummer', + 'edit_user_validation_company_label' => 'Bedrijfsnaam', + 'edit_user_validation_groups_label' => 'Groepen', + 'edit_user_validation_password_label' => 'Wachtwoord', + 'edit_user_validation_password_confirm_label' => 'Wachtwoord bevestiging', + + // Create Group + 'create_group_title' => 'Groep aanmaken', + 'create_group_heading' => 'Groep aanmaken', + 'create_group_subheading' => 'Gelieve hieronder de groep informatie aan te vullen.', + 'create_group_name_label' => 'Groepsnaam:', + 'create_group_desc_label' => 'Beschrijving:', + 'create_group_submit_btn' => 'Groep aanmaken', + 'create_group_validation_name_label' => 'Groepsnaam', + 'create_group_validation_desc_label' => 'Beschrijving', + + // Edit Group + 'edit_group_title' => 'Groep bewerken', + 'edit_group_saved' => 'Groep opgeslagen', + 'edit_group_heading' => 'Groep bewerken', + 'edit_group_subheading' => 'Gelieve hieronder de groep informatie aan te vullen.', + 'edit_group_name_label' => 'Groepsnaam:', + 'edit_group_desc_label' => 'Beschrijving:', + 'edit_group_submit_btn' => 'Groep opslaan', + 'edit_group_validation_name_label' => 'Groepsnaam', + 'edit_group_validation_desc_label' => 'Beschrijving', + + // Change Password + 'change_password_heading' => 'Wachtwoord wijzigen', + 'change_password_old_password_label' => 'Oud wachtwoord:', + 'change_password_new_password_label' => 'Nieuw wachtwoord (minstens %s tekens lang):', + 'change_password_new_password_confirm_label' => 'Bevestig nieuw wachtwoord:', + 'change_password_submit_btn' => 'Wijzig', + 'change_password_validation_old_password_label' => 'Oud wachtwoord', + 'change_password_validation_new_password_label' => 'Nieuw wachtwoord', + 'change_password_validation_new_password_confirm_label' => 'Bevestig nieuw wachtwoord', + + // Forgot Password + 'forgot_password_heading' => 'Wachtwoord vergeten', + 'forgot_password_subheading' => 'Gelieve uw %sadres in te vullen zodat we u een e-mail kunnen sturen om uw wachtwoord te wijzigen.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Verzenden', + 'forgot_password_validation_email_label' => 'E-mailadres', + 'forgot_password_username_identity_label' => 'Gebruikersnaam', + 'forgot_password_email_identity_label' => 'E-mail', + 'forgot_password_email_not_found' => 'Het opgegeven e-mailadres werd niet terug gevonden.', + 'forgot_password_identity_not_found' => 'De opgegeven identiteit kon niet gevonden worden.', + + // Reset Password + 'reset_password_heading' => 'Wachtwoord wijzigen', + 'reset_password_new_password_label' => 'Nieuw wachtwoord (minstens %s tekens lang):', + 'reset_password_new_password_confirm_label' => 'Bevestig nieuw wachtwoord:', + 'reset_password_submit_btn' => 'Verander', + 'reset_password_validation_new_password_label' => 'Nieuw wachtwoord', + 'reset_password_validation_new_password_confirm_label' => 'Bevestig nieuw wachtwoord', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Wachtwoord resetten voor %s', + 'emailForgotPassword_subheading' => 'Gelieve op deze link te klikken om %s.', + 'emailForgotPassword_link' => 'Reset uw wachtwoord', +]; diff --git a/Language/nl/IonAuth.php b/Language/nl/IonAuth.php new file mode 100644 index 000000000..a769558a0 --- /dev/null +++ b/Language/nl/IonAuth.php @@ -0,0 +1,79 @@ + 'Account is aangemaakt', + 'account_creation_unsuccessful' => 'Account aanmaken is mislukt', + 'account_creation_duplicate_email' => 'E-mailadres is al in gebruik of ongeldig', + 'account_creation_duplicate_identity' => 'Gebruikersnaam is al in gebruik of ongeldig', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Standaard groep is niet ingesteld', + 'account_creation_invalid_defaultGroup' => 'Standaard groepsnaam is ongeldig', + + + // Password + 'password_change_successful' => 'Wachtwoord succesvol gewijzigd', + 'password_change_unsuccessful' => 'Wachtwoord wijzigen is mislukt', + 'forgot_password_successful' => 'E-mail om het wachtwoord te resetten is verzonden', + 'forgot_password_unsuccessful' => 'Wachtwoord resetten is mislukt', + + // Activation + 'activate_successful' => 'Account is geactiveerd', + 'activate_unsuccessful' => 'Account activeren is mislukt', + 'deactivate_successful' => 'Account is gedeactiveerd', + 'deactivate_unsuccessful' => 'Accound deactiveren is mislukt', + 'activation_email_successful' => 'Activatie e-mail is verzonden', + 'activation_email_unsuccessful' => 'Activatie e-mail verzenden is mislukt', + 'deactivate_current_user_unsuccessful'=> 'U kunt uzelf niet deactiveren.', + + // Login / Logout + 'login_successful' => 'U bent ingelogd', + 'login_unsuccessful' => 'Login is incorrect', + 'login_unsuccessful_not_active' => 'Account is inactief', + 'login_timeout' => 'U bent tijdelijk geblokkeerd. Probeer het later nogmaals.', + 'logout_successful' => 'U bent uitgelogd', + + // Account Changes + 'update_successful' => 'Account is bijgewerkt', + 'update_unsuccessful' => 'Account bijwerken is mislukt', + 'delete_successful' => 'Gebruiker is verwijderd', + 'delete_unsuccessful' => 'Gebruiker verwijderen is mislukt', + + // Groups + 'group_creation_successful' => 'Groep is succesvol aangemaakt', + 'group_already_exists' => 'Groepsnaam is reeds in gebruik', + 'group_update_successful' => 'Groepsinformatie is bijgewerkt', + 'group_delete_successful' => 'Groep is verwijderd', + 'group_delete_unsuccessful' => 'Groep verwijderen is mislukt', + 'group_delete_notallowed' => 'Het is niet mogelijk om de administrator groep te verwijderen', + 'group_name_required' => 'Groepsnaam is een verplicht veld', + 'group_name_admin_not_alter' => 'De naam van de administrator groep is niet aanpasbaar', + + // Activation Email + 'emailActivation_subject' => 'Account activering', + 'emailActivate_heading' => 'Activeer account voor %s', + 'emailActivate_subheading' => 'Gelieve op deze link te klikken om %s.', + 'emailActivate_link' => 'Activeer uw account', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Verificatie vergeten wachtwoord', + 'emailForgotPassword_heading' => 'Reset wachtwoord voor %s', + 'emailForgotPassword_subheading' => 'Gelieve op deze link te klikken om %s.', + 'emailForgotPassword_link' => 'Reset uw wachtwoord', +]; diff --git a/Language/no/Auth.php b/Language/no/Auth.php new file mode 100644 index 000000000..9ac5b79ed --- /dev/null +++ b/Language/no/Auth.php @@ -0,0 +1,161 @@ + 'Dette skjemaet ble stoppet i sikkerhetskontrollen vår.', + + // Login + 'login_heading' => 'Logg inn', + 'login_subheading' => 'Vennligst logg inn med din email/brukernavn og passord nedenfor.', + 'login_identity_label' => 'Email/brukernavn:', + 'login_password_label' => 'Passord:', + 'login_remember_label' => 'Husk meg:', + 'login_submit_btn' => 'Logg inn', + 'login_forgot_password' => 'Glemt passordet?', + + // Index + 'index_heading' => 'Brukere', + 'index_subheading' => 'Nedenfor er en liste over brukerne.', + 'index_fname_th' => 'Fornavn', + 'index_lname_th' => 'Etternavn', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Grupper', + 'index_status_th' => 'Status', + 'index_action_th' => 'Handling', + 'index_active_link' => 'Aktive', + 'index_inactive_link' => 'Inaktiv', + 'index_create_user_link' => 'Lag ny bruker', + 'index_create_group_link' => 'Lag ny gruppe', + + // Deactivate User + 'deactivate_heading' => 'Deaktivér bruker', + 'deactivate_subheading' => 'Er du sikker på at du vil deaktivere brukeren \'%s\'', + 'deactivate_confirm_y_label' => 'Ja:', + 'deactivate_confirm_n_label' => 'Nei:', + 'deactivate_submit_btn' => 'Fullfør', + 'deactivate_validation_confirm_label' => 'bekreftelse', + 'deactivate_validation_user_id_label' => 'bruker-ID', + + // Create User + 'create_user_heading' => 'Lag ny bruker', + 'create_user_subheading' => 'Legg inn informasjon om brukeren nedenfor.', + 'create_user_fname_label' => 'Fornavn:', + 'create_user_lname_label' => 'Etternavn:', + 'create_user_company_label' => 'Firmanavn:', + 'create_user_identity_label' => 'Identity:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telefon:', + 'create_user_password_label' => 'Passord:', + 'create_user_password_confirm_label' => 'Bekreft passord:', + 'create_user_submit_btn' => 'Lag ny bruker', + 'create_user_validation_fname_label' => 'Fornavn', + 'create_user_validation_lname_label' => 'Etternavn', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email', + 'create_user_validation_phone1_label' => 'Første del av telefonnummer', + 'create_user_validation_phone2_label' => 'Andre del av telefonnummer', + 'create_user_validation_phone3_label' => 'Tredje del av telefonnummer', + 'create_user_validation_company_label' => 'Firmanavn', + 'create_user_validation_password_label' => 'Passord', + 'create_user_validation_password_confirm_label' => 'Bekreftelse av passord', + + // Edit User + 'edit_user_heading' => 'Redigér bruker', + 'edit_user_subheading' => 'Vennligst legg inn informasjon om brukeren nedenfor.', + 'edit_user_fname_label' => 'Fornavn:', + 'edit_user_lname_label' => 'Etternavn:', + 'edit_user_company_label' => 'Firmanavn:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telefon:', + 'edit_user_password_label' => 'Passord: (hvis passordet skal endres)', + 'edit_user_password_confirm_label' => 'Bekreft passord: (hvis passordet skal endres)', + 'edit_user_groups_heading' => 'Medlem av grupper', + 'edit_user_submit_btn' => 'Lagre bruker', + 'edit_user_validation_fname_label' => 'Fornavn', + 'edit_user_validation_lname_label' => 'Etternavn', + 'edit_user_validation_email_label' => 'Email', + 'edit_user_validation_phone1_label' => 'Første del av telefonnummer', + 'edit_user_validation_phone2_label' => 'Andre del av telefonnummer', + 'edit_user_validation_phone3_label' => 'Tredje del av telefonnummer', + 'edit_user_validation_company_label' => 'Firmanavn', + 'edit_user_validation_groups_label' => 'Grupper', + 'edit_user_validation_password_label' => 'Passord', + 'edit_user_validation_password_confirm_label' => 'Bekreftelse av passord', + + // Create Group + 'create_group_title' => 'Lag gruppe', + 'create_group_heading' => 'Lag gruppe', + 'create_group_subheading' => 'Legg inn informasjon om gruppen nedenfor.', + 'create_group_name_label' => 'Gruppenavn:', + 'create_group_desc_label' => 'Beskrivelse:', + 'create_group_submit_btn' => 'Lag gruppe', + 'create_group_validation_name_label' => 'Gruppenavn', + 'create_group_validation_desc_label' => 'Beskrivelse', + + // Edit Group + 'edit_group_title' => 'Redigér gruppe', + 'edit_group_saved' => 'Gruppe lagret', + 'edit_group_heading' => 'Redigér gruppe', + 'edit_group_subheading' => 'Legg inn informasjon om gruppen nedenfor.', + 'edit_group_name_label' => 'Gruppenavn:', + 'edit_group_desc_label' => 'Beskrivelse:', + 'edit_group_submit_btn' => 'Lagre gruppe', + 'edit_group_validation_name_label' => 'Gruppenavn', + 'edit_group_validation_desc_label' => 'Beskrivelse', + + // Change Password + 'change_password_heading' => 'Endre passord', + 'change_password_old_password_label' => 'Gammelt passord:', + 'change_password_new_password_label' => 'Nytt passord (minst %s tegn):', + 'change_password_new_password_confirm_label' => 'Bekreft nytt passord:', + 'change_password_submit_btn' => 'Endre', + 'change_password_validation_old_password_label' => 'Gammelt passord', + 'change_password_validation_new_password_label' => 'Nytt passord', + 'change_password_validation_new_password_confirm_label' => 'Bekreft nytt passord', + + // Forgot Password + 'forgot_password_heading' => 'Glemt passord', + 'forgot_password_subheading' => 'Legg inn din %s så vi kan sende deg en email for å tilbakestille passordet.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Send inn', + 'forgot_password_validation_email_label' => 'Email', + 'forgot_password_username_identity_label' => 'Brukernavn', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Vi fant ikke emailen du oppgav.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Endre passord', + 'reset_password_new_password_label' => 'Nytt passord (minst %s tegn):', + 'reset_password_new_password_confirm_label' => 'Bekreft nytt passord:', + 'reset_password_submit_btn' => 'Endre', + 'reset_password_validation_new_password_label' => 'Nytt passord', + 'reset_password_validation_new_password_confirm_label' => 'Bekreft nytt passord', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Tilbakestill passord for %s', + 'emailForgotPassword_subheading' => 'Klikk denne linken for å %s.', + 'emailForgotPassword_link' => 'Tilbakestill passordet ditt', +]; diff --git a/Language/no/IonAuth.php b/Language/no/IonAuth.php new file mode 100644 index 000000000..737ec5c72 --- /dev/null +++ b/Language/no/IonAuth.php @@ -0,0 +1,81 @@ + 'Konto opprettet', + 'account_creation_unsuccessful' => 'Klarte ikke å opprette konto', + 'account_creation_duplicate_email' => 'E-posten er allerede i bruk eller ugyldig', + 'account_creation_duplicate_identity' => 'Brukernavnet er allerede i bruk eller ugyldig', + 'account_creation_missing_defaultGroup' => 'Standardgruppe er ikke valgt', + 'account_creation_invalid_defaultGroup' => 'Ugyldig gruppenavn', + + + // Password + 'password_change_successful' => 'Passordet har blitt endret', + 'password_change_unsuccessful' => 'Klarte ikke å endre passord', + 'forgot_password_successful' => 'E-post for tilbakestilling av passord har blitt sendt', + 'forgot_password_unsuccessful' => 'Klarte ikke å tilbakestille passord', + + // Activation + 'activate_successful' => 'Kontoen har blitt aktivert', + 'activate_unsuccessful' => 'Klarte ikke å aktivere konto', + 'deactivate_successful' => 'Kontoen har blitt deaktivert', + 'deactivate_unsuccessful' => 'Klarte ikke å deaktivere konto', + 'activation_email_successful' => 'E-post for aktivering av konto har blitt sendt', + 'activation_email_unsuccessful' => 'Klarte ikke å sende e-post for aktivering av konto', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Logget inn', + 'login_unsuccessful' => 'Feil e-post/brukernavn eller passord', + 'login_unsuccessful_not_active' => 'Kontoen er inaktiv', + 'login_timeout' => 'Midlertidig sperret. Logg inn senere.', + 'logout_successful' => 'Logget ut', + + // Account Changes + 'update_successful' => 'Kontoinformasjon oppdatert', + 'update_unsuccessful' => 'Klarte ikke å oppdatere kontoinformasjon', + 'delete_successful' => 'Konto slettet', + 'delete_unsuccessful' => 'Klarte ikke å slette konto', + + // Groups + 'group_creation_successful' => 'Gruppe opprettet', + 'group_already_exists' => 'Gruppenavnet finnes allerede', + 'group_update_successful' => 'Gruppeinformasjon oppdatert', + 'group_delete_successful' => 'Gruppe slettet', + 'group_delete_unsuccessful' => 'Klarte ikke å slette gruppe', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Gruppenavn må fylles inn', + 'group_name_admin_not_alter' => 'Admingruppenavnet kan ikke endres', + + // Activation Email + 'emailActivation_subject' => 'Aktivering av konto', + 'emailActivate_heading' => 'Aktivér konto for %s', + 'emailActivate_subheading' => 'Klikk på denne linken for å %s.', + 'emailActivate_link' => 'Aktivér konto', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Glemt passord: bekreftelse', + 'emailForgotPassword_heading' => 'Tilbakestill passord for %s', + 'emailForgotPassword_subheading' => 'Klikk på denne linken for å %s.', + 'emailForgotPassword_link' => 'Tilbakestill passord', +]; diff --git a/Language/pl/Auth.php b/Language/pl/Auth.php new file mode 100644 index 000000000..e869281a2 --- /dev/null +++ b/Language/pl/Auth.php @@ -0,0 +1,155 @@ + 'Login', + 'login_subheading' => 'Zaloguj się poniżej używając email/username oraz hasła.', + 'login_identity_label' => 'Nazwa użytkownika:', + 'login_password_label' => 'Hało:', + 'login_remember_label' => 'Pamiętaj mnie:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Zapomniałeś hasła?', + + // Index + 'index_heading' => 'Użytkownicy', + 'index_subheading' => 'Lista użytkowników poniżej.', + 'index_fname_th' => 'Imię', + 'index_lname_th' => 'Nazwisko', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Grupy', + 'index_status_th' => 'Status', + 'index_action_th' => 'Akcja', + 'index_active_link' => 'Aktywny', + 'index_inactive_link' => 'Nieaktywny', + 'index_create_user_link' => 'Utwórz nowego użykownika', + 'index_create_group_link' => 'Utwórz nową grupę', + + // Deactivate User + 'deactivate_heading' => 'Deaktywuj użytkownika', + 'deactivate_subheading' => 'Czy jesteś pewny, że chcesz deaktywować użytkownika \'%s\'', + 'deactivate_confirm_y_label' => 'Tak:', + 'deactivate_confirm_n_label' => 'Nie:', + 'deactivate_submit_btn' => 'Wyślij', + 'deactivate_validation_confirm_label' => 'potwierdzenie', + 'deactivate_validation_user_id_label' => 'ID użytkownika', + + // Create User + 'create_user_heading' => 'Dodaj użytkownika', + 'create_user_subheading' => 'Wprowadź poniżej dane użytkownika.', + 'create_user_fname_label' => 'Imię:', + 'create_user_lname_label' => 'Nazwisko:', + 'create_user_identity_label' => 'Nazwa użytkownika:', + 'create_user_company_label' => 'Nazwa firmy:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telefon:', + 'create_user_password_label' => 'Hasło:', + 'create_user_password_confirm_label' => 'Potwierdź hasło:', + 'create_user_submit_btn' => 'Utwórz użytkownika', + 'create_user_validation_fname_label' => 'Imię', + 'create_user_validation_lname_label' => 'Nazwisko', + 'create_user_validation_identity_label' => 'Nazwa użytkownika', + 'create_user_validation_email_label' => 'Adres e-mail', + 'create_user_validation_phone_label' => 'Telefon', + 'create_user_validation_phone1_label' => 'Telefon - część pierwsza', + 'create_user_validation_phone2_label' => 'Telefon - część druga', + 'create_user_validation_phone3_label' => 'Telefon - część trzecia', + 'create_user_validation_company_label' => 'Nazwa firmy', + 'create_user_validation_password_label' => 'Hasło', + 'create_user_validation_password_confirm_label' => 'Potwierdź hasło', + + // Edit User + 'edit_user_heading' => 'Edytuj użytkownika', + 'edit_user_subheading' => 'Proszę wprowadzić poniżej dane użykownika.', + 'edit_user_fname_label' => 'Imię:', + 'edit_user_lname_label' => 'Nazwisko:', + 'edit_user_company_label' => 'Nazwa firmy:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telefon:', + 'edit_user_password_label' => 'Hasło (jeśli zmieniasz hasło)', + 'edit_user_password_confirm_label' => 'Potwierdź hasło: (jeśli zmieniasz hasło)', + 'edit_user_groups_heading' => 'Czlonek grupy', + 'edit_user_submit_btn' => 'Zapisz użytkownika', + 'edit_user_validation_phone_label' => 'Telefon', + 'edit_user_validation_fname_label' => 'Imię', + 'edit_user_validation_lname_label' => 'Nazwisko', + 'edit_user_validation_email_label' => 'Adres e-mail', + + 'edit_user_validation_phone1_label' => 'Telefon - część pierwsza', + 'edit_user_validation_phone2_label' => 'Telefon - część druga', + 'edit_user_validation_phone3_label' => 'Telefon - część trzecia', + 'edit_user_validation_company_label' => 'Nazwa firmy', + 'edit_user_validation_groups_label' => 'Grupa', + 'edit_user_validation_password_label' => 'Hasło', + 'edit_user_validation_password_confirm_label' => 'Potwierdź hasło', + + // Create Group + 'create_group_title' => 'Utwórz grupę', + 'create_group_heading' => 'Utwórz grupę', + 'create_group_subheading' => 'Wprowadź poniżej dane dla nowej grupy.', + 'create_group_name_label' => 'Nazwa grupy:', + 'create_group_desc_label' => 'Opis:', + 'create_group_submit_btn' => 'Utwórz grupę', + 'create_group_validation_name_label' => 'Nazwa grupy', + 'create_group_validation_desc_label' => 'Opis', + + // Edit Group + 'edit_group_heading' => 'Edytuj grupę', + 'edit_group_subheading' => 'Wprowadź poniżej dane grupy.', + 'edit_group_name_label' => 'Nazwa grupy', + 'edit_group_desc_label' => 'Opis:', + 'edit_group_submit_btn' => 'Zapisz', + 'edit_group_validation_name_label' => 'Nazwa grupy', + 'edit_group_validation_desc_label' => 'Opis', + + // Change Password + 'change_password_heading' => 'Zmień hasło', + 'change_password_old_password_label' => 'Stare hasło:', + 'change_password_new_password_label' => 'Nowe hasło (minimum %s znaków):', + 'change_password_new_password_confirm_label' => 'Potwierdź nowe hasło:', + 'change_password_submit_btn' => 'Zmień', + 'change_password_validation_old_password_label' => 'Stare hasło', + 'change_password_validation_new_password_label' => 'Nowe hasło', + 'change_password_validation_new_password_confirm_label' => 'Potwierdź nowe hasło', + + // Forgot Password + 'forgot_password_heading' => 'Przypomnienie hasła', + 'forgot_password_subheading' => 'Proszę wprowadź swój %s ayśmy mogli wysłać Ci email do zresetowania hasła.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Wyślij', + 'forgot_password_validation_email_label' => 'Adres email', + 'forgot_password_username_identity_label' => 'Nazwa użytkownika', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Nie znaleziono w bazie użytkownika o tym adresie.', + 'forgot_password_identity_not_found' => 'Nie znaleziono użytkownika o tym adresie email.', + + // Reset Password + 'reset_password_heading' => 'Zmiana hasła', + 'reset_password_new_password_label' => 'Nowe hasło (minimum %s znaków):', + 'reset_password_new_password_confirm_label' => 'Potwierdź nowe hasło:', + 'reset_password_submit_btn' => 'Zmień', + 'reset_password_validation_new_password_label' => 'Nowe hasło', + 'reset_password_validation_new_password_confirm_label' => 'Potwierdź nowe hasło', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Zresetuj hasło dla %s', + 'emailForgotPassword_subheading' => 'Proszę klilknąć na link aby %s.', + 'emailForgotPassword_link' => 'Resetuj hasło', +]; diff --git a/Language/pl/IonAuth.php b/Language/pl/IonAuth.php new file mode 100644 index 000000000..7c79dc4df --- /dev/null +++ b/Language/pl/IonAuth.php @@ -0,0 +1,85 @@ + 'Konto zostało pomyślnie założone', + 'account_creation_unsuccessful' => 'Nie można utworzyć konta', + 'account_creation_duplicate_email' => 'Podany adres Email jest nieprawidłowy lub został już użyty', + 'account_creation_duplicate_identity' => 'Podana nazwa użytkownika jest nieprawidłowa lub została już użyta', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Domyślna grupa nie jest ustawiona', + 'account_creation_invalid_defaultGroup' => 'Nieprawidłowa nazwa domyślnej grupy', + + + // Password + 'password_change_successful' => 'Hasło zostało pomyślnie zmienione', + 'password_change_unsuccessful' => 'Nie można zmienić hasła', + 'forgot_password_successful' => 'Nowe hasło zostało wysłane', + 'forgot_password_unsuccessful' => 'Nie można zresetować hasła', + + // Activation + 'activate_successful' => 'Konto zostało aktywowane', + 'activate_unsuccessful' => 'Nie można aktywować konta', + 'deactivate_successful' => 'Konto zostało deaktywowane', + 'deactivate_unsuccessful' => 'Nie można deaktywować konta', + 'activation_email_successful' => 'Na twój adres E-mail został wysłany link aktywacyjny', + 'activation_email_unsuccessful' => 'Nie można wysłać linku aktywacyjnego', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Użytkownik został pomyślnie zalogowany', + 'login_unsuccessful' => 'Nieprawidłowy login', + 'login_unsuccessful_not_active' => 'Konto nie jest aktywne', + 'login_timeout' => 'Konto tymczasowo zablokowane. Spróbuj ponownie później', + 'logout_successful' => 'Użytkownik został pomyślnie wylogowany', + + // Account Changes + 'update_successful' => 'Konto zostało pomyślnie uaktualnione', + 'update_unsuccessful' => 'Nie można uaktualnić konta', + 'delete_successful' => 'Użytkownik został skasowany', + 'delete_unsuccessful' => 'Nie można skasować użytkownika', + + // Groups + 'group_creation_successful' => 'Grupa została utworzona pomyślnie', + 'group_already_exists' => 'Podana grupa już istnieje!', + 'group_update_successful' => 'Grupa została zaktualizowana', + 'group_delete_successful' => 'Grupa została usunięta', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Nie można usunąć grupy administracyjnej', + 'group_name_required' => 'Nazwa grupy jest wymagana', + 'group_name_admin_not_alter' => 'Nazwa grupy administracyjnej nie może zostać zmieniona!', + + // Activation Email + 'emailActivation_subject' => 'Aktywacja Konta', + 'emailActivate_heading' => 'Aktywuj konto dla %s', + 'emailActivate_subheading' => 'Przejdź do tego adresu aby aktywować swoje konto %s.', + 'emailActivate_link' => 'Aktywacja konta', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Resetowanie hasła', + 'emailForgotPassword_heading' => 'Zresetuj hasło dla %s', + 'emailForgotPassword_subheading' => 'Przejdź do tego adresu aby zresetować swoje hasło %s.', + 'emailForgotPassword_link' => 'Resetowanie hasła', +]; diff --git a/Language/pt/Auth.php b/Language/pt/Auth.php new file mode 100644 index 000000000..75d7c17bd --- /dev/null +++ b/Language/pt/Auth.php @@ -0,0 +1,149 @@ + 'O envio desse formulario não atendeu a requisitos de segurança.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Por favor entre com seu login/email e senha abaixo.', + 'login_identity_label' => 'Login/Email:', + 'login_password_label' => 'Senha:', + 'login_remember_label' => 'Lembre-me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Esqueceu sua senha?', + + // Index + 'index_heading' => 'Usuários', + 'index_subheading' => 'Abaixo uma lista com os usuários.', + 'index_fname_th' => 'Nome', + 'index_lname_th' => 'Sobrenome', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Grupos', + 'index_status_th' => 'Estado', + 'index_action_th' => 'Ação', + 'index_active_link' => 'Ativo', + 'index_inactive_link' => 'Inativo', + 'index_create_user_link' => 'Criar novo usuário', + 'index_create_group_link' => 'Criar novo grupo', + + // Deactivate User + 'deactivate_heading' => 'Desativar Usuário', + 'deactivate_subheading' => 'Você tem certeza que deseja desativar esse usuário \'%s\'', + 'deactivate_confirm_y_label' => 'Sim:', + 'deactivate_confirm_n_label' => 'Não:', + 'deactivate_submit_btn' => 'Enviar', + 'deactivate_validation_confirm_label' => 'confirmação', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Criar Usuário', + 'create_user_subheading' => 'Por favor informe os dados do usuário.', + 'create_user_fname_label' => 'Nome:', + 'create_user_lname_label' => 'Sobrenome:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Empresa:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telefone:', + 'create_user_password_label' => 'Senha:', + 'create_user_password_confirm_label' => 'Confirmar senha:', + 'create_user_submit_btn' => 'Criar Usuário', + 'create_user_validation_fname_label' => 'Nome', + 'create_user_validation_lname_label' => 'Sobrenome', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email', + 'create_user_validation_phone1_label' => 'Primeira parte do telefone', + 'create_user_validation_phone2_label' => 'Segunda parte do telefone', + 'create_user_validation_phone3_label' => 'Terceira parte do telefone', + 'create_user_validation_company_label' => 'Empresa', + 'create_user_validation_password_label' => 'Senha', + 'create_user_validation_password_confirm_label' => 'Confirmação de Senha', + + // Edit User + 'edit_user_heading' => 'Editar Usuário', + 'edit_user_subheading' => 'Por favor informe os dados sobre o usuário abaixo.', + 'edit_user_fname_label' => 'Nome:', + 'edit_user_lname_label' => 'Sobrenome:', + 'edit_user_company_label' => 'Empresa:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telefone:', + 'edit_user_password_label' => 'Senha: (se quiser mudar a senha)', + 'edit_user_password_confirm_label' => 'Confirme a senha: (se quiser mudar a senha)', + 'edit_user_groups_heading' => 'Membro dos grupos', + 'edit_user_submit_btn' => 'Salvar Usuário', + 'edit_user_validation_fname_label' => 'Nome', + 'edit_user_validation_lname_label' => 'Sobrenome', + 'edit_user_validation_email_label' => 'Email', + 'edit_user_validation_phone1_label' => 'Primeira parte do fone', + 'edit_user_validation_phone2_label' => 'Segunda parte do fone', + 'edit_user_validation_phone3_label' => 'Terceira parte do fone', + 'edit_user_validation_company_label' => 'Empresa', + 'edit_user_validation_groups_label' => 'Grupos', + 'edit_user_validation_password_label' => 'Senha', + 'edit_user_validation_password_confirm_label' => 'Confirme a senha', + + // Create Group + 'create_group_title' => 'Criar Grupo', + 'create_group_heading' => 'Criar Grupo', + 'create_group_subheading' => 'Por favor informe os dados sobre o grupo abaixo.', + 'create_group_name_label' => 'Nome:', + 'create_group_desc_label' => 'Descrição:', + 'create_group_submit_btn' => 'Criar Grupo', + 'create_group_validation_name_label' => 'Nome', + 'create_group_validation_desc_label' => 'Descrição', + + // Edit Group + 'edit_group_title' => 'Editar Grupo', + 'edit_group_saved' => 'Grupo Salvo', + 'edit_group_heading' => 'Editar Group', + 'edit_group_subheading' => 'Por favor informe os dados sobre o grupo abaixo.', + 'edit_group_name_label' => 'Nome:', + 'edit_group_desc_label' => 'Descrição:', + 'edit_group_submit_btn' => 'Salvar Grupo', + 'edit_group_validation_name_label' => 'Nome', + 'edit_group_validation_desc_label' => 'Descrição', + + // Change Password + 'change_password_heading' => 'Mudar Senha', + 'change_password_old_password_label' => 'Senha Antiga:', + 'change_password_new_password_label' => 'Nova senha: (mínimo de %s caracteres)', + 'change_password_new_password_confirm_label' => 'Confirme sua Nova Senha:', + 'change_password_submit_btn' => 'Mudar', + 'change_password_validation_old_password_label' => 'Senha Antiga', + 'change_password_validation_new_password_label' => 'Nova Senha', + 'change_password_validation_new_password_confirm_label' => 'Confirme sua Nova Senha', + + // Forgot Password + 'forgot_password_heading' => 'Esqueceu a Senha', + 'forgot_password_subheading' => 'Por favor, informe seu %s para que possamos enviar para você uma mensagem para recuparar sua senha.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Enviar', + 'forgot_password_validation_email_label' => 'Email', + 'forgot_password_username_identity_label' => 'Login', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Este email não foi encontrado.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Mudar Senha', + 'reset_password_new_password_label' => 'Nova senha: (mínimo de %s caracteres)', + 'reset_password_new_password_confirm_label' => 'Confirme sua Nova Senha:', + 'reset_password_submit_btn' => 'Mudar', + 'reset_password_validation_new_password_label' => 'Senha Antiga', + 'reset_password_validation_new_password_confirm_label' => 'Confirme sua Nova Senha', +]; diff --git a/Language/pt/IonAuth.php b/Language/pt/IonAuth.php new file mode 100644 index 000000000..20666d055 --- /dev/null +++ b/Language/pt/IonAuth.php @@ -0,0 +1,76 @@ + 'Conta criada com sucesso', + 'account_creation_unsuccessful' => 'Não foi possível criar a conta', + 'account_creation_duplicate_email' => 'Email em uso ou inválido', + 'account_creation_duplicate_identity' => 'Nome de usuário em uso ou inválido', + 'account_creation_missing_defaultGroup' => 'Grupo padrão não está definido', + 'account_creation_invalid_defaultGroup' => 'Nome padrão do grupo definido é inválido', + + // Password + 'password_change_successful' => 'Senha alterada com sucesso', + 'password_change_unsuccessful' => 'Não foi possível alterar a senha', + 'forgot_password_successful' => 'Nova senha enviada por email', + 'forgot_password_unsuccessful' => 'Não foi possível criar uma nova senha', + + // Activation + 'activate_successful' => 'Conta ativada', + 'activate_unsuccessful' => 'Não foi possível ativar a conta', + 'deactivate_successful' => 'Conta desativada', + 'deactivate_unsuccessful' => 'Não foi possível desativar a conta', + 'activation_email_successful' => 'Email de ativação enviado com sucesso', + 'activation_email_unsuccessful' => 'Não foi possível enviar o email de ativação', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Sessão iniciada com sucesso', + 'login_unsuccessful' => 'Usuário ou senha inválidos', + 'login_unsuccessful_not_active' => 'A conta está desativada', + 'login_timeout' => 'Conta temporariamente bloqueada. Tente novamente mais tarde', + 'logout_successful' => 'Sessão encerrada com sucesso', + + // Account Changes + 'update_successful' => 'Informações da conta atualizadas com sucesso', + 'update_unsuccessful' => 'Não foi possível atualizar as informações da conta', + 'delete_successful' => 'Usuário excluído com sucesso', + 'delete_unsuccessful' => 'Não foi possível excluir o usuário', + + // Groups + 'group_creation_successful' => 'Grupo criado com sucesso', + 'group_already_exists' => 'Um grupo com este nome já existe', + 'group_update_successful' => 'Dados do grupo atualizados com sucesso', + 'group_delete_successful' => 'Grupo excluído com sucesso', + 'group_delete_unsuccessful' => 'Não foi possível excluir o grupo', + 'group_delete_notallowed' => 'Não é possível excluir o grupo de administradores', + 'group_name_required' => 'Nome do grupo é um campo obrigatório', + 'group_name_admin_not_alter' => 'Nome do grupo administrador não pode ser alterado', + + // Activation Email + 'emailActivation_subject' => 'Ativação da conta', + 'emailActivate_heading' => 'Ative sua conta para %s', + 'emailActivate_subheading' => 'Por favor, clique neste link para %s.', + 'emailActivate_link' => 'Ative sua conta', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Esqueci a senha', + 'emailForgotPassword_heading' => 'Redefinido a senha para %s', + 'emailForgotPassword_subheading' => 'Por favor, clique neste link para %s.', + 'emailForgotPassword_link' => 'Redefina sua senha', +]; diff --git a/Language/ro/Auth.php b/Language/ro/Auth.php new file mode 100644 index 000000000..4cca6b776 --- /dev/null +++ b/Language/ro/Auth.php @@ -0,0 +1,144 @@ + 'Acest formular nu a trecut de verificările de securitate.', + + // Login + 'login_heading' => 'Conectare', + 'login_subheading' => 'Conectează-te cu email-ul/numele de utilizator și parola.', + 'login_identity_label' => 'Email/Nume utilizator:', + 'login_password_label' => 'Parolă:', + 'login_remember_label' => 'Ține-mă minte:', + 'login_submit_btn' => 'Conectare', + 'login_forgot_password' => 'Ați uitat parola?', + + // Index + 'index_heading' => 'Utilizatori', + 'index_subheading' => 'Mai jos găsiți o listă cu utilizatorii.', + 'index_fname_th' => 'Prenume', + 'index_lname_th' => 'Nume', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Grupuri', + 'index_status_th' => 'Status', + 'index_action_th' => 'Acțiune', + 'index_active_link' => 'Activ', + 'index_inactive_link' => 'Inactiv', + 'index_create_user_link' => 'Creează un nou utilizator', + 'index_create_group_link' => 'Creează un nou grup', + + // Deactivate User + 'deactivate_heading' => 'Dezactivează utilizator', + 'deactivate_subheading' => 'Sunteți sigur că vreți să dezactivăm utilizatorul \'%s\'', + 'deactivate_confirm_y_label' => 'Da:', + 'deactivate_confirm_n_label' => 'Nu:', + 'deactivate_submit_btn' => 'Aprobă', + 'deactivate_validation_confirm_label' => 'confirmare', + 'deactivate_validation_user_id_label' => 'ID utilizator', + + // Create User + 'create_user_heading' => 'Creează utilizator', + 'create_user_subheading' => 'Vă rugăm să introduceți informațiile de mai jos.', + 'create_user_fname_label' => 'Prenume:', + 'create_user_lname_label' => 'Nume:', + 'create_user_identity_label' => 'Identitate:', + 'create_user_company_label' => 'Companie:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telefon:', + 'create_user_password_label' => 'Parolă:', + 'create_user_password_confirm_label' => 'Confirmă parola:', + 'create_user_submit_btn' => 'Creează utilizator', + 'create_user_validation_fname_label' => 'Prenume', + 'create_user_validation_lname_label' => 'Nume', + 'create_user_validation_identity_label' => 'Identitate', + 'create_user_validation_email_label' => 'Adresă email', + 'create_user_validation_phone_label' => 'Telefon', + 'create_user_validation_company_label' => 'Companie', + 'create_user_validation_password_label' => 'Parolă', + 'create_user_validation_password_confirm_label' => 'Confirmarea parolei', + + // Edit User + 'edit_user_heading' => 'Editează utilizatorul', + 'edit_user_subheading' => 'Vă rugăm să introduceți informațiile utilizatorului de mai jos.', + 'edit_user_fname_label' => 'Prenume:', + 'edit_user_lname_label' => 'Nume:', + 'edit_user_company_label' => 'Companie:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telefon:', + 'edit_user_password_label' => 'Parolă: (dacă schimbați parola)', + 'edit_user_password_confirm_label' => 'Confirmă parola: (dacă schimbați parola)', + 'edit_user_groups_heading' => 'Membru al grupurilor', + 'edit_user_submit_btn' => 'Salvează utilizator', + 'edit_user_validation_fname_label' => 'Prenume', + 'edit_user_validation_lname_label' => 'Nume', + 'edit_user_validation_email_label' => 'Adresa email', + 'edit_user_validation_phone_label' => 'Telefon', + 'edit_user_validation_company_label' => 'Companie', + 'edit_user_validation_groups_label' => 'Grupuri', + 'edit_user_validation_password_label' => 'Parolă', + 'edit_user_validation_password_confirm_label' => 'Confirmarea parolei', + + // Create Group + 'create_group_title' => 'Creează grup', + 'create_group_heading' => 'Creează grup', + 'create_group_subheading' => 'Vă rugăm să introduceți informațiile grupului mai jos.', + 'create_group_name_label' => 'Numele grupului:', + 'create_group_desc_label' => 'Descriere:', + 'create_group_submit_btn' => 'Creează grupul', + 'create_group_validation_name_label' => 'Numele grupului', + 'create_group_validation_desc_label' => 'Descriere', + + // Edit Group + 'edit_group_title' => 'Editează datele grupului', + 'edit_group_saved' => 'Grup salvat', + 'edit_group_heading' => 'Editează grupul', + 'edit_group_subheading' => 'Vă rugăm să introduceți informațiile grupului mai jos.', + 'edit_group_name_label' => 'Numele grupului:', + 'edit_group_desc_label' => 'Descriere:', + 'edit_group_submit_btn' => 'Salvează grupul', + 'edit_group_validation_name_label' => 'Numele grupului', + 'edit_group_validation_desc_label' => 'Descriere', + + // Change Password + 'change_password_heading' => 'Schimbă parola', + 'change_password_old_password_label' => 'Parola veche:', + 'change_password_new_password_label' => 'Noua parolă (cel puțin %s caractere):', + 'change_password_new_password_confirm_label' => 'Confirmă noua parolă:', + 'change_password_submit_btn' => 'Schimbă', + 'change_password_validation_old_password_label' => 'Parola veche', + 'change_password_validation_new_password_label' => 'Parola nouă', + 'change_password_validation_new_password_confirm_label' => 'Confirmă noua parola', + + // Forgot Password + 'forgot_password_heading' => 'Parolă uitată', + 'forgot_password_subheading' => 'Vă rugăm să introduceți %s pentru a vă putea trimite un email de resetare a parolei.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Trimite', + 'forgot_password_validation_email_label' => 'Adresa de email', + 'forgot_password_username_identity_label' => 'Utilizator', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Nu există nicio înregistrare cu acest email.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Schimbare parolă', + 'reset_password_new_password_label' => 'Parola nouă (cel puțin %s caractere):', + 'reset_password_new_password_confirm_label' => 'Confirmă noua parolă:', + 'reset_password_submit_btn' => 'Schimbă', + 'reset_password_validation_new_password_label' => 'Parola nouă', + 'reset_password_validation_new_password_confirm_label' => 'Confirmă noua parolă', +]; diff --git a/Language/ro/IonAuth.php b/Language/ro/IonAuth.php new file mode 100644 index 000000000..dcbdc0479 --- /dev/null +++ b/Language/ro/IonAuth.php @@ -0,0 +1,75 @@ + 'Cont creat cu succes', + 'account_creation_unsuccessful' => 'Nu am reușit să creez contul', + 'account_creation_duplicate_email' => 'Email deja folosit sau invalid', + 'account_creation_duplicate_identity' => 'Numele de utilizator este deja folosit sau este invalid', + 'account_creation_missing_defaultGroup' => 'Grupul prestabilit nu a fost setat', + 'account_creation_invalid_defaultGroup' => 'Ați setat un nume greșit pentru grupul prestabilit', + + // Password + 'password_change_successful' => 'Parolă schimbată cu succes', + 'password_change_unsuccessful' => 'Nu am reușit să schimb parola', + 'forgot_password_successful' => 'Emailul de resetare a parolei a fost trimis', + 'forgot_password_unsuccessful' => 'Nu am reușit să resetez parola', + + // Activation + 'activate_successful' => 'Cont activat', + 'activate_unsuccessful' => 'Nu am reușit să activez contul', + 'deactivate_successful' => 'Cont dezactivat', + 'deactivate_unsuccessful' => 'Nu am reușit să dezactivez contul', + 'activation_email_successful' => 'Mailul de activare a fost trimis', + 'activation_email_unsuccessful' => 'Nu am reușit să trimit mailul de activare', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Conectarea a reușit', + 'login_unsuccessful' => 'Date de logare incorecte', + 'login_unsuccessful_not_active' => 'Contul este dezactivat', + 'login_timeout' => 'Ați fost temporar scos din sesiune. Încercați mai tarziu.', + 'logout_successful' => 'Deconectarea a reușit', + + // Account Changes + 'update_successful' => 'Informațiile contului au fost actualizate cu succes', + 'update_unsuccessful' => 'Nu am reușit să actualizez informațiile contului', + 'delete_successful' => 'Utilizator șters', + 'delete_unsuccessful' => 'Nu am reușit să șterg utilizatorul', + + // Groups + 'group_creation_successful' => 'Grup creat cu succes', + 'group_already_exists' => 'Numele de grup a fost deja utilizat', + 'group_update_successful' => 'Detaliile grupului au fost actualizate', + 'group_delete_successful' => 'Grup șters cu succes', + 'group_delete_unsuccessful' => 'Nu am putut șterge grupul', + 'group_delete_notallowed' => 'Nu pot șterge grupul administratorilor', + 'group_name_required' => 'Este necesar un nume pentru grup', + 'group_name_admin_not_alter' => 'Numele grupului administratorilor nu poate fi schimbat', + + // Activation Email + 'emailActivation_subject' => 'Activarea contului', + 'emailActivate_heading' => 'Activarea contului pentru %s', + 'emailActivate_subheading' => 'Dați clic pe această adresă pentru %s.', + 'emailActivate_link' => 'Activarea contul', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Verificarea parolei uitate', + 'emailForgotPassword_heading' => 'Resetarea parolei pentru %s', + 'emailForgotPassword_subheading' => 'Dați clic pe această adresă pentru %s.', + 'emailForgotPassword_link' => 'Resetarea parolei', +]; diff --git a/Language/ru/Auth.php b/Language/ru/Auth.php new file mode 100644 index 000000000..0f4f4bca6 --- /dev/null +++ b/Language/ru/Auth.php @@ -0,0 +1,160 @@ + 'Форма не прошла проверку безопасности.', + + // Login + 'login_heading' => 'Вход', + 'login_subheading' => 'Для входа используйте email/имя пользователя и пароль.', + 'login_identity_label' => 'Email:', + 'login_password_label' => 'Пароль:', + 'login_remember_label' => 'Запомнить меня:', + 'login_submit_btn' => 'Вход', + 'login_forgot_password' => 'Забыли свой пароль?', + + // Index + 'index_heading' => 'Пользователь', + 'index_subheading' => 'Доступный список пользователей.', + 'index_fname_th' => 'Имя', + 'index_lname_th' => 'Фамилия', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Группы', + 'index_status_th' => 'Статус', + 'index_action_th' => 'Действие', + 'index_active_link' => 'Активный', + 'index_inactive_link' => 'Неактивный', + 'index_create_user_link' => 'Создать нового пользователя', + 'index_create_group_link' => 'Создать новую группу', + + // Deactivate User + 'deactivate_heading' => 'Деактивировать пользователя', + 'deactivate_subheading' => 'Вы уверены, что хотите деактивировать пользователя \'%s\'', + 'deactivate_confirm_y_label' => 'Да:', + 'deactivate_confirm_n_label' => 'Нет:', + 'deactivate_submit_btn' => 'Отправить', + 'deactivate_validation_confirm_label' => 'подтверждение', + 'deactivate_validation_user_id_label' => 'ID пользователя', + + // Create User + 'create_user_heading' => 'Создать пользователя', + 'create_user_subheading' => 'Пожалуйста заполните следующую информацию.', + 'create_user_fname_label' => 'Имя:', + 'create_user_lname_label' => 'Фамилия:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Компания:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Телефон:', + 'create_user_password_label' => 'Пароль:', + 'create_user_password_confirm_label' => 'Подтверждение пароля:', + 'create_user_submit_btn' => 'Создать пользователя', + 'create_user_validation_fname_label' => 'Имя', + 'create_user_validation_lname_label' => 'Фамилия', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email', + 'create_user_validation_phone1_label' => 'Первая часть телефона', + 'create_user_validation_phone2_label' => 'Вторая часть телефона', + 'create_user_validation_phone3_label' => 'Третья часть телефона', + 'create_user_validation_company_label' => 'Компания', + 'create_user_validation_password_label' => 'Пароль', + 'create_user_validation_password_confirm_label' => 'Подтверждение пароля', + + // Edit User + 'edit_user_heading' => 'Редактировать пользователя', + 'edit_user_subheading' => 'Пожалуйста заполните информацию ниже.', + 'edit_user_fname_label' => 'Имя:', + 'edit_user_lname_label' => 'Фамилия:', + 'edit_user_company_label' => 'Название компании:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Телефон:', + 'edit_user_password_label' => 'Пароль: (если изменился)', + 'edit_user_password_confirm_label' => 'Подтвердить пароль: (если изменился)', + 'edit_user_groups_heading' => 'Член группы', + 'edit_user_submit_btn' => 'Сохранить пользователя', + 'edit_user_validation_fname_label' => 'Имя', + 'edit_user_validation_lname_label' => 'Фамилия', + 'edit_user_validation_email_label' => 'Email', + 'edit_user_validation_phone1_label' => 'Первая часть телефона', + 'edit_user_validation_phone2_label' => 'Вторая часть телефона', + 'edit_user_validation_phone3_label' => 'Третья часть телефона', + 'edit_user_validation_company_label' => 'Компания', + 'edit_user_validation_groups_label' => 'Группы', + 'edit_user_validation_password_label' => 'Пароль', + 'edit_user_validation_password_confirm_label' => 'Подтверждение пароля', + + // Create Group + 'create_group_title' => 'Создать группу', + 'create_group_heading' => 'Создать группу', + 'create_group_subheading' => 'Пожалуйста заполните следующую информацию.', + 'create_group_name_label' => 'Группа:', + 'create_group_desc_label' => 'Описание:', + 'create_group_submit_btn' => 'Создать группу', + 'create_group_validation_name_label' => 'Группа', + 'create_group_validation_desc_label' => 'Описание', + + // Edit Group + 'edit_group_title' => 'Редактировать группу', + 'edit_group_saved' => 'Группа сохранена', + 'edit_group_heading' => 'Редактировать группу', + 'edit_group_subheading' => 'Пожалуйста заполните следующую информацию.', + 'edit_group_name_label' => 'Название группы:', + 'edit_group_desc_label' => 'Описание:', + 'edit_group_submit_btn' => 'Сохранить группу', + 'edit_group_validation_name_label' => 'Группа', + 'edit_group_validation_desc_label' => 'Описание', + + // Change Password + 'change_password_heading' => 'Изменить пароль', + 'change_password_old_password_label' => 'Старый пароль:', + 'change_password_new_password_label' => 'Новый пароль (минимум %s символов):', + 'change_password_new_password_confirm_label' => 'Подтвердить пароль:', + 'change_password_submit_btn' => 'Изменить', + 'change_password_validation_old_password_label' => 'Старый пароль', + 'change_password_validation_new_password_label' => 'Новый пароль', + 'change_password_validation_new_password_confirm_label' => 'Подтвердить пароль', + + // Forgot Password + 'forgot_password_heading' => 'Забыли пароль', + 'forgot_password_subheading' => 'Пожалуйста введите ваш email и мы сможем отправить вам email с новым паролем.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Отправить', + 'forgot_password_validation_email_label' => 'Email', + 'forgot_password_username_identity_label' => 'Логин', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_back' => 'Вернуться', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Изменить пароль', + 'reset_password_new_password_label' => 'Новый пароль (минимум 8 символов):', + 'reset_password_new_password_confirm_label' => 'Подвердить:', + 'reset_password_submit_btn' => 'Изменить', + 'reset_password_validation_new_password_label' => 'Новый пароль', + 'reset_password_validation_new_password_confirm_label' => 'Подтвердить', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Сбросить пароль для %s', + 'emailForgotPassword_subheading' => 'Пожалуста по ссылке для %s.', + 'emailForgotPassword_link' => 'Сбросить пароль', +]; diff --git a/Language/ru/IonAuth.php b/Language/ru/IonAuth.php new file mode 100644 index 000000000..78b778353 --- /dev/null +++ b/Language/ru/IonAuth.php @@ -0,0 +1,74 @@ + 'Учетная запись успешно создана', + 'account_creation_unsuccessful' => 'Невозможно создать учетную запись', + 'account_creation_duplicate_email' => 'Электронная почта используется или некорректна', + 'account_creation_duplicate_username' => 'Имя пользователя существует или некорректно', + 'account_creation_missing_defaultGroup' => 'Группа по умолчанию не установлена', + 'account_creation_invalid_defaultGroup' => 'Группа по умолчанию задана некорректно', + + // Password + 'password_change_successful' => 'Пароль успешно изменен', + 'password_change_unsuccessful' => 'Пароль невозможно изменить', + 'forgot_password_successful' => 'Пароль сброшен. На электронную почту отправлено сообщение', + 'forgot_password_unsuccessful' => 'Невозможен сброс пароля', + + // Activation + 'activate_successful' => 'Учетная запись активирована', + 'activate_unsuccessful' => 'Не удалось активировать учетную запись', + 'deactivate_successful' => 'Учетная запись деактивирована', + 'deactivate_unsuccessful' => 'Невозможно деактивировать учетную запись', + 'activation_email_successful' => 'Сообщение об активации отправлено', + 'activation_email_unsuccessful' => 'Сообщение об активации невозможно отправить', + 'deactivate_current_user_unsuccessful'=> 'Вы не можете сами деактивировать свою учетную запись', + + // Login / Logout + 'login_successful' => 'Авторизация прошла успешно', + 'login_unsuccessful' => 'Логин/пароль не верен', + 'login_unsuccessful_not_active' => 'Акаунт не активен', + 'login_timeout' => 'В целях безопасности возможность входа временно заблокирована. Попробуйте зайти позже.', + 'logout_successful' => 'Выход успешный', + + // Account Changes + 'update_successful' => 'Учетная запись успешно обновлена', + 'update_unsuccessful' => 'Невозможно обновить учетную запись', + 'delete_successful' => 'Учетная запись удалена', + 'delete_unsuccessful' => 'Невозможно удалить учетную запись', + + // Groups + 'group_creation_successful' => 'Группа создана успешно', + 'group_already_exists' => 'Группа с таким именем уже существует', + 'group_update_successful' => 'Данные группы обновлены успешно', + 'group_delete_successful' => 'Группа удалена', + 'group_delete_unsuccessful' => 'Не удалось удалить группу', + 'group_delete_notallowed' => 'Нельзя удалить группу администраторов', + 'group_name_required' => 'Имя группы обязательно к заполнению', + // Activation Email + 'emailActivation_subject' => 'Активация учетной записи', + 'emailActivate_heading' => 'Активировать акаунт с именем %s', + 'emailActivate_subheading' => 'Нажмите на ссылку %s.', + 'emailActivate_link' => 'Активировать ваш акаунт', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Проверка забытого пароля', + 'emailForgotPassword_heading' => 'Сброс пароля для пользователя %s', + 'emailForgotPassword_subheading' => 'Нажмите на ссылку для %s.', + 'emailForgotPassword_link' => 'Восстановления пароля', +]; diff --git a/Language/sk/Auth.php b/Language/sk/Auth.php new file mode 100644 index 000000000..59ce62a5b --- /dev/null +++ b/Language/sk/Auth.php @@ -0,0 +1,154 @@ + 'Tento formulár neprešiel bezpečnostnou kontrolou.', + + // Login + 'login_heading' => 'Prihlásenie', + 'login_subheading' => 'Prosím prihláste sa nižšie pomocou svojho emailu alebo užívateľským menom a heslom', + 'login_identity_label' => 'E-mail / Užívateľské meno:', + 'login_password_label' => 'Heslo', + 'login_remember_label' => 'Zampamätať:', + 'login_submit_btn' => 'Prihlásiť', + 'login_forgot_password' => 'Zabudli ste heslo?', + + // Index + 'index_heading' => 'Používatelia', + 'index_subheading' => 'Nižšie je zoznam používateľov.', + 'index_fname_th' => 'Meno', + 'index_lname_th' => 'Priezvisko', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Skupiny', + 'index_status_th' => 'Stav', + 'index_action_th' => 'Akcia', + 'index_active_link' => 'Aktívne', + 'index_inactive_link' => 'Neaktívne', + 'index_create_user_link' => 'Vytvoriť nového používateľa', + 'index_create_group_link' => 'Vytvoriť novú skupinu', + + // Deactivate User + 'deactivate_heading' => 'Deaktivovať používateľa', + 'deactivate_subheading' => 'Ste si istí, že chcete deaktivovať užívateľa \'%s\'', + 'deactivate_confirm_y_label' => 'Áno', + 'deactivate_confirm_n_label' => 'Nie', + 'deactivate_submit_btn' => 'Odoslať', + 'deactivate_validation_confirm_label' => 'potvrdenie', + 'deactivate_validation_user_id_label' => 'ID používateľa', + + // Create User + 'create_user_heading' => 'Vytvoriť používateľa', + 'create_user_subheading' => 'Prosím, zadajte informácie o používateľovi nižšie.', + 'create_user_fname_label' => 'Meno:', + 'create_user_lname_label' => 'Priezvisko:', + 'create_user_identity_label' => 'Identita:', + 'create_user_company_label' => 'Názov spoločnosti:', + 'create_user_email_label' => 'E-mail:', + 'create_user_phone_label' => 'Telefón:', + 'create_user_password_label' => 'Heslo', + 'create_user_password_confirm_label' => 'Potvrdiť heslo:', + 'create_user_submit_btn' => 'Vytvoriť používateľa', + 'create_user_validation_fname_label' => 'Meno', + 'create_user_validation_lname_label' => 'Priezvisko', + 'create_user_validation_identity_label' => 'Identita', + 'create_user_validation_email_label' => 'E-mailová adresa', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Názov spoločnosti', + 'create_user_validation_password_label' => 'Heslo', + 'create_user_validation_password_confirm_label' => 'Heslo na potvrdenie', + + // Edit User + 'edit_user_heading' => 'Upraviť používateľa', + 'edit_user_subheading' => 'Prosím, zadajte informácie o používateľovi nižšie.', + 'edit_user_fname_label' => 'Meno:', + 'edit_user_lname_label' => 'Priezvisko:', + 'edit_user_company_label' => 'Názov spoločnosti:', + 'edit_user_email_label' => 'E-mail:', + 'edit_user_phone_label' => 'Telefón:', + 'edit_user_password_label' => 'Heslo: (ak meníte heslo)', + 'edit_user_password_confirm_label' => 'Potvrdiť heslo: (ak meníte heslo)', + 'edit_user_groups_heading' => 'Člen používateľskej skupiny', + 'edit_user_submit_btn' => 'Uložiť používateľa', + 'edit_user_validation_fname_label' => 'Meno', + 'edit_user_validation_lname_label' => 'Priezvisko', + 'edit_user_validation_email_label' => 'E-mailová adresa', + 'edit_user_validation_phone_label' => 'Telefón', + 'edit_user_validation_company_label' => 'Názov spoločnosti', + 'edit_user_validation_groups_label' => 'Skupiny používateľa', + 'edit_user_validation_password_label' => 'Heslo', + 'edit_user_validation_password_confirm_label' => 'Heslo na potvrdenie', + + // Create Group + 'create_group_title' => 'Vytvoriť skupinu', + 'create_group_heading' => 'Vytvoriť skupinu', + 'create_group_subheading' => 'Prosím, zadajte nižšie informácie o skupine.', + 'create_group_name_label' => 'Názov skupiny:', + 'create_group_desc_label' => 'Popis:', + 'create_group_submit_btn' => 'Vytvoriť skupinu', + 'create_group_validation_name_label' => 'Názov skupiny', + 'create_group_validation_desc_label' => 'Popis', + + // Edit Group + 'edit_group_title' => 'Upraviť skupinu', + 'edit_group_saved' => 'Skupina uložená', + 'edit_group_heading' => 'Upraviť skupinu', + 'edit_group_subheading' => 'Prosím, zadajte informácie o skupine nižšie.', + 'edit_group_name_label' => 'Názov skupiny:', + 'edit_group_desc_label' => 'Popis:', + 'edit_group_submit_btn' => 'Uložiť skupinu', + 'edit_group_validation_name_label' => 'Názov skupiny', + 'edit_group_validation_desc_label' => 'Popis', + + // Change Password + 'change_password_heading' => 'Zmena hesla', + 'change_password_old_password_label' => 'Staré heslo:', + 'change_password_new_password_label' => 'Nové heslo (najmenej %s znakov):', + 'change_password_new_password_confirm_label' => 'Potvrdiť nové heslo:', + 'change_password_submit_btn' => 'Zmeniť', + 'change_password_validation_old_password_label' => 'Staré heslo', + 'change_password_validation_new_password_label' => 'Nové heslo', + 'change_password_validation_new_password_confirm_label' => 'Potvrdiť nové heslo', + + // Forgot Password + 'forgot_password_heading' => 'Zabudli ste heslo', + 'forgot_password_subheading' => 'Zadajte prosím vašu %s, takže vám môžeme poslať e-mail pre resetovanie hesla', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Odoslať', + 'forgot_password_validation_email_label' => 'E-mailová adresa', + 'forgot_password_username_identity_label' => 'Používateľské meno', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Žiadny záznam s toutu e-mailovou adresou.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Zmena hesla', + 'reset_password_new_password_label' => 'Nové heslo (najmenej% s znakov):', + 'reset_password_new_password_confirm_label' => 'Potvrdiť nové heslo:', + 'reset_password_submit_btn' => 'Zmeniť', + 'reset_password_validation_new_password_label' => 'Nové heslo', + 'reset_password_validation_new_password_confirm_label' => 'Potvrdiť nové heslo', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Vytvoriť nové heslo pre %s', + 'emailForgotPassword_subheading' => 'Prosím kliknite na tento odkaz %s.', + 'emailForgotPassword_link' => 'Reset hesla', + + 'email new_password nadpis' => 'Vaše heslo bolo obnovené: %s', +]; diff --git a/Language/sk/IonAuth.php b/Language/sk/IonAuth.php new file mode 100644 index 000000000..875c39ff3 --- /dev/null +++ b/Language/sk/IonAuth.php @@ -0,0 +1,74 @@ + 'Účet bol úspešne vytvorený', + 'account_creation_unsuccessful' => 'Nie je možné vytvoriť účet', + 'account_creation_duplicate_email' => 'E-mail už existuje alebo je neplatný', + 'account_creation_duplicate_identity' => 'Užívateľské meno už existuje alebo je neplatné', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Základná skupina nenastavená', + 'account_creation_invalid_defaultGroup' => 'Nesprávne meno základnej skupiny', + + // Password + 'password_change_successful' => 'Heslo bolo úspešne zmenené', + 'password_change_unsuccessful' => 'Nie je možné zmeniť heslo', + 'forgot_password_successful' => 'Heslo bolo odoslané na e-mail', + 'forgot_password_unsuccessful' => 'Nie je možné obnoviť heslo', + + // Activation + 'activate_successful' => 'Účet bol aktivovaný', + 'activate_unsuccessful' => 'Nie je možné aktivovať účet', + 'deactivate_successful' => 'Účet bol deaktivovaný', + 'deactivate_unsuccessful' => 'Nie je možné deaktivovať účet', + 'activation_email_successful' => 'Aktivačný e-mail bol odoslaný', + 'activation_email_unsuccessful' => 'Nedá sa odoslať aktivačný e-mail', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Úspešne prihlásený', + 'login_unsuccessful' => 'Nesprávny e-mail alebo heslo', + 'login_unsuccessful_not_active' => 'Účet je neaktívny', + 'login_timeout' => 'Dočasne uzamknuté z bezpečnostných dôvodov. Skúste neskôr', + 'logout_successful' => 'Úspešné odhlásenie', + + // Account Changes + 'update_successful' => 'Informácie o účte boli úspešne aktualizované', + 'update_unsuccessful' => 'Informácie o účte sa nedájú aktualizovať', + 'delete_successful' => 'Užívateľ bol zmazaný', + 'delete_unsuccessful' => 'Užívateľ sa nedá zmazať ', + + // Groups + 'group_creation_successful' => 'Skupina úspešne vytvorená', + 'group_already_exists' => 'Meno skupiny už existuje', + 'group_update_successful' => 'Detaily skupiny upravené', + 'group_delete_successful' => 'Skupina zmazaná', + 'group_delete_unsuccessful' => 'Nemôžem zmazať skupinu', + 'group_delete_notallowed' => 'Nemôžem zmazať administrátorskú skupinu', + 'group_name_required' => 'Meno skupiny je požadované pole', + 'group_name_admin_not_alter' => 'Administratorská skupina nemôže byť zmenená', + + // Activation Email + 'emailActivation_subject' => 'Aktivácia účtu', + 'emailActivate_heading' => 'Aktivujte účet na %s', + 'emailActivate_subheading' => 'Prosím kliknite na tento odkaz pre %s.', + 'emailActivate_link' => 'Aktivujte váš účet', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Obnovenie hesla kontrola', + 'emailForgotPassword_heading' => 'Obnoviť heslo pre %s', + 'emailForgotPassword_subheading' => 'Prosím kliknite na tento odkaz pre %s.', + 'emailForgotPassword_link' => 'Reset vášho hesla', +]; diff --git a/Language/sl/Auth.php b/Language/sl/Auth.php new file mode 100644 index 000000000..b99525c21 --- /dev/null +++ b/Language/sl/Auth.php @@ -0,0 +1,152 @@ + 'Slednji obrazec ni ustrezal našim varnostnim zahtevam.', + + // Prijava + 'login_heading' => 'Prijava', + 'login_subheading' => 'Prosimo, spodaj se prijavite z vašim e-naslovom/uporabniškim imenom in geslom', + 'login_identity_label' => 'E-naslov/Uporabniško ime:', + 'login_password_label' => 'Geslo:', + 'login_remember_label' => 'Zapomni si me:', + 'login_submit_btn' => 'Prijava', + 'login_forgot_password' => 'Pozabljeno geslo?', + + // Index + 'index_heading' => 'Uporabniki', + 'index_subheading' => 'Spodaj je lista uporabnikov.', + 'index_fname_th' => 'Ime', + 'index_lname_th' => 'Priimek', + 'index_email_th' => 'E-naslov', + 'index_groups_th' => 'Skupine', + 'index_status_th' => 'Status', + 'index_action_th' => 'Akcija', + 'index_active_link' => 'Aktiven', + 'index_inactive_link' => 'Neaktiven', + 'index_create_user_link' => 'Ustvari novega uporabnika', + 'index_create_group_link' => 'Ustvari novo skupino', + + // Deaktiviraj uporabnika + 'deactivate_heading' => 'Deaktiviraj uporabnika', + 'deactivate_subheading' => 'Ali ste prepričani, da želite deaktivirati uporabnika \'%s\'', + 'deactivate_confirm_y_label' => 'Da:', + 'deactivate_confirm_n_label' => 'Ne:', + 'deactivate_submit_btn' => 'Pošlji', + 'deactivate_validation_confirm_label' => 'potrditev', + 'deactivate_validation_user_id_label' => 'uporabniški ID', + + // Ustvari uporabnika + 'create_user_heading' => 'Ustvari uporabnika', + 'create_user_subheading' => 'Prosimo, vnesite podatke o uporabniku.', + 'create_user_fname_label' => 'Ime:', + 'create_user_lname_label' => 'Priimek:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Ime podjetja:', + 'create_user_email_label' => 'E-naslov:', + 'create_user_phone_label' => 'Telefon:', + 'create_user_password_label' => 'Geslo:', + 'create_user_password_confirm_label' => 'Potrdite geslo:', + 'create_user_submit_btn' => 'Ustvari uporabnika', + 'create_user_validation_fname_label' => 'Ime', + 'create_user_validation_lname_label' => 'Priimek', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'E-naslov', + 'create_user_validation_phone_label' => 'Telefon', + 'create_user_validation_company_label' => 'Podjetje', + 'create_user_validation_password_label' => 'Geslo', + 'create_user_validation_password_confirm_label' => 'Potrditev gesla', + + // Spremeni uporabnika + 'edit_user_heading' => 'Spremeni uporabnika', + 'edit_user_subheading' => 'Prosimo, spodaj vnesite podatke o uporabniku.', + 'edit_user_fname_label' => 'Ime:', + 'edit_user_lname_label' => 'Priimek:', + 'edit_user_company_label' => 'Podjetje:', + 'edit_user_email_label' => 'E-naslov:', + 'edit_user_phone_label' => 'Telefon:', + 'edit_user_password_label' => 'Geslo: (če spreminjate geslo)', + 'edit_user_password_confirm_label' => 'Potrdi geslo: (če spreminjate geslo)', + 'edit_user_groups_heading' => 'Član skupin', + 'edit_user_submit_btn' => 'Shrani uporabnika', + 'edit_user_validation_fname_label' => 'Ime', + 'edit_user_validation_lname_label' => 'Priimek', + 'edit_user_validation_email_label' => 'E-naslov', + 'edit_user_validation_phone_label' => 'Telefon', + 'edit_user_validation_company_label' => 'Podjetje', + 'edit_user_validation_groups_label' => 'Skupine', + 'edit_user_validation_password_label' => 'Geslo', + 'edit_user_validation_password_confirm_label' => 'Potrditev gesla', + + // Ustvari skupino + 'create_group_title' => 'Ustvari skupino', + 'create_group_heading' => 'Ustvari skupino', + 'create_group_subheading' => 'Prosmo, vnesite podatke o skupini.', + 'create_group_name_label' => 'Ime skupine:', + 'create_group_desc_label' => 'Opis:', + 'create_group_submit_btn' => 'Ustvari skupino', + 'create_group_validation_name_label' => 'Ime skupine', + 'create_group_validation_desc_label' => 'Opis', + + // Spremeni skupino + 'edit_group_title' => 'Spremeni skupino', + 'edit_group_saved' => 'Skupina shranjena', + 'edit_group_heading' => 'Spremeni skupino', + 'edit_group_subheading' => 'Prosmo, vnesite podatke o skupini.', + 'edit_group_name_label' => 'Ime skupine:', + 'edit_group_desc_label' => 'Opis:', + 'edit_group_submit_btn' => 'Shrani skupino', + 'edit_group_validation_name_label' => 'Ime skupine', + 'edit_group_validation_desc_label' => 'Opis', + + // Spremeni geslo + 'change_password_heading' => 'Spremeni geslo', + 'change_password_old_password_label' => 'Staro geslo:', + 'change_password_new_password_label' => 'Novo geslo (vsaj %s znakov dolgo):', + 'change_password_new_password_confirm_label' => 'Potrdi novo geslo:', + 'change_password_submit_btn' => 'Spremeni', + 'change_password_validation_old_password_label' => 'Staro geslo', + 'change_password_validation_new_password_label' => 'Novo geslo', + 'change_password_validation_new_password_confirm_label' => 'Potrdi novo geslo', + + // Pozabljeno geslo + 'forgot_password_heading' => 'Pozabljeno geslo', + 'forgot_password_subheading' => 'Prosimo vnesite %s, da vam lahko pošljemo e-sporočilo za ponastavitev gesla.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Pošlji', + 'forgot_password_validation_email_label' => 'Elektronski naslov', + 'forgot_password_username_identity_label' => 'Uporabniško ime', + 'forgot_password_email_identity_label' => 'E-naslov', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Ponastavi geslo + 'reset_password_heading' => 'Spremeni geslo', + 'reset_password_new_password_label' => 'Novo geslo (vsaj %s znakov dolgo):', + 'reset_password_new_password_confirm_label' => 'Potrdi novo geslo:', + 'reset_password_submit_btn' => 'Spremeni', + 'reset_password_validation_new_password_label' => 'Novo geslo', + 'reset_password_validation_new_password_confirm_label' => 'Potrdi novo geslo', + + // Pozabljeno geslo sporočilo + 'emailForgotPassword_heading' => 'Ponastavite geslo za %s', + 'emailForgotPassword_subheading' => 'Prosimo, sledite povezavi do %s.', + 'emailForgotPassword_link' => 'Ponastavite geslo', + + // Novo geslo sporočilo +]; diff --git a/Language/sl/IonAuth.php b/Language/sl/IonAuth.php new file mode 100644 index 000000000..d68c81969 --- /dev/null +++ b/Language/sl/IonAuth.php @@ -0,0 +1,78 @@ + 'Račun je bil uspešno ustvarjen', + 'account_creation_unsuccessful' => 'Ni mogoče ustvariti računa', + 'account_creation_duplicate_email' => 'Elektronski naslov je neveljaven ali pa že obstaja', + 'account_creation_duplicate_identity' => 'Uporabniško ime je neveljavno ali pa že obstaja', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Default group is not set', + 'account_creation_invalid_defaultGroup' => 'Invalid default group name set', + + // Geslo + 'password_change_successful' => 'Geslo je bilo uspešno spremenjeno', + 'password_change_unsuccessful' => 'Ni mogoče spremeniti gesla', + 'forgot_password_successful' => 'Zahteva za ponastavitev gesla je bila uspešno poslana', + 'forgot_password_unsuccessful' => 'Gesla ni mogoče ponastaviti', + + // Aktivacija + 'activate_successful' => 'Račun aktiviran', + 'activate_unsuccessful' => 'Ni mogoče aktivirati računa', + 'deactivate_successful' => 'Račun deaktiviran', + 'deactivate_unsuccessful' => 'Ni mogoče deaktivirati računa', + 'activation_email_successful' => 'Aktivacijska pošta uspešno poslana', + 'activation_email_unsuccessful' => 'Aktivacijske pošte ni možno poslati', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Prijava / Odjava + 'login_successful' => 'Uspešna prijava', + 'login_unsuccessful' => 'Neuspešna prijava', + 'login_unsuccessful_not_active' => 'Račun je neaktiven', + 'login_timeout' => 'Začasno zaklenjen. Poskusite ponovno pozneje.', + 'logout_successful' => 'Uspešna odjava', + + // Sprememba računa + 'update_successful' => 'Informacije računa so bile uspešno posodobljene', + 'update_unsuccessful' => 'Informacije računa ni možno posodobljene', + 'delete_successful' => 'Uporabnik izbrisan', + 'delete_unsuccessful' => 'Ni možno izbrisati uporabnika', + + // Skupina + 'group_creation_successful' => 'Skupina je bila uspešno ustvarjena', + 'group_already_exists' => 'Ime skupine že obstaja', + 'group_update_successful' => 'Podatki o skupini so bili uspešno posodobljeni', + 'group_delete_successful' => 'Skupina izbrisana', + 'group_delete_unsuccessful' => 'Ni možno izbrisati skupine', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Ime skupine je obvezno polje', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Aktivacija računa', + 'emailActivate_heading' => 'Activate account for %s', + 'emailActivate_subheading' => 'Prosimo, sledite povezavi do %s.', + 'emailActivate_link' => 'Aktivirajte vaš račun', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Pozabljeno geslo', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/sv/Auth.php b/Language/sv/Auth.php new file mode 100644 index 000000000..39da89f83 --- /dev/null +++ b/Language/sv/Auth.php @@ -0,0 +1,147 @@ + 'Detta formulär klarade inte av våra säkerhetskontroller.', + + // Login + 'login_heading' => 'Logga in', + 'login_subheading' => 'Logga in med email/användarnamn och lösenord nedanför.', + 'login_identity_label' => 'Email/Användarnamn:', + 'login_password_label' => 'Lösenord:', + 'login_remember_label' => 'Kom ihåg mig:', + 'login_submit_btn' => 'Logga in', + 'login_forgot_password' => 'Glömt lösenord?', + + // Index + 'index_heading' => 'Användare', + 'index_subheading' => 'Lista över användare nedanför.', + 'index_fname_th' => 'Förnamn', + 'index_lname_th' => 'Efternamn', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Grupper', + 'index_status_th' => 'Status', + 'index_action_th' => 'Åtgärder', + 'index_active_link' => 'Aktiv', + 'index_inactive_link' => 'Inaktiv', + 'index_create_user_link' => 'Skapa ny användare', + 'index_create_group_link' => 'Skapa ny grupp', + + // Deactivate User + 'deactivate_heading' => 'Inaktivera Användare', + 'deactivate_subheading' => 'Är du säker att du vill inaktivera användaren \'%s\'', + 'deactivate_confirm_y_label' => 'Ja:', + 'deactivate_confirm_n_label' => 'Nej:', + 'deactivate_submit_btn' => 'Skicka', + 'deactivate_validation_confirm_label' => 'bekräftelse', + 'deactivate_validation_user_id_label' => 'användar ID', + + // Create User + 'create_user_heading' => 'Skapa Användare', + 'create_user_subheading' => 'Ange användarens uppgifter nedanför.', + 'create_user_fname_label' => 'Förnamn:', + 'create_user_lname_label' => 'Efternamn:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Företagsnamn:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Telefon:', + 'create_user_password_label' => 'Lösenord:', + 'create_user_password_confirm_label' => 'Bekräfta Lösenord:', + 'create_user_submit_btn' => 'Skapa Användare', + 'create_user_validation_fname_label' => 'Förnamn', + 'create_user_validation_lname_label' => 'Efternamn', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Adress', + 'create_user_validation_phone_label' => 'Telefonnummer', + 'create_user_validation_company_label' => 'Företagsnamn', + 'create_user_validation_password_label' => 'Lösenord', + 'create_user_validation_password_confirm_label' => 'Lösenordsbekräftelse', + + // Edit User + 'edit_user_heading' => 'Ändra användare', + 'edit_user_subheading' => 'Ange användarens uppgifter nedanför.', + 'edit_user_fname_label' => 'Förnamn:', + 'edit_user_lname_label' => 'Efternamn:', + 'edit_user_company_label' => 'Företagsnamn:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Telefon:', + 'edit_user_password_label' => 'Lösenord: (om lösenord ändras)', + 'edit_user_password_confirm_label' => 'Bekräfta Lösenord: (om lösenord ändras)', + 'edit_user_groups_heading' => 'Medlem i grupper', + 'edit_user_submit_btn' => 'Spara Användare', + 'edit_user_validation_fname_label' => 'Förnamn', + 'edit_user_validation_lname_label' => 'Efternamn', + 'edit_user_validation_email_label' => 'Email Adress', + 'edit_user_validation_phone_label' => 'Telefonnummer', + 'edit_user_validation_company_label' => 'Företagsnamn', + 'edit_user_validation_groups_label' => 'Grupper', + 'edit_user_validation_password_label' => 'Lösenord', + 'edit_user_validation_password_confirm_label' => 'Lösenordsbekräftelse', + + // Create Group + 'create_group_title' => 'Skapa Grupp', + 'create_group_heading' => 'Skapa Grupp', + 'create_group_subheading' => 'Ange gruppuppgifter nedan.', + 'create_group_name_label' => 'Gruppnamn:', + 'create_group_desc_label' => 'Beskrivning:', + 'create_group_submit_btn' => 'Skapa Grupp', + 'create_group_validation_name_label' => 'Gruppnamn', + 'create_group_validation_desc_label' => 'Beskrivning', + + // Edit Group + 'edit_group_title' => 'Ändra Grupp', + 'edit_group_saved' => 'Grupp Sparad', + 'edit_group_heading' => 'Ändra Grupp', + 'edit_group_subheading' => 'Ange gruppuppgifter nedan.', + 'edit_group_name_label' => 'Gruppnamn:', + 'edit_group_desc_label' => 'Beskrivning:', + 'edit_group_submit_btn' => 'Spara Grupp', + 'edit_group_validation_name_label' => 'Gruppnamn', + 'edit_group_validation_desc_label' => 'Beskrivning', + + // Change Password + 'change_password_heading' => 'Ändra Lösenord', + 'change_password_old_password_label' => 'Gammalt lösenord:', + 'change_password_new_password_label' => 'Nytt lösenord (åtminstone %s karaktärer långt):', + 'change_password_new_password_confirm_label' => 'Bekräfta nytt lösenord:', + 'change_password_submit_btn' => 'Ändra', + 'change_password_validation_old_password_label' => 'Gammalt lösenord', + 'change_password_validation_new_password_label' => 'Nytt Lösenord', + 'change_password_validation_new_password_confirm_label' => 'Bekräfta nytt lösenord', + + // Forgot Password + 'forgot_password_heading' => 'Glömt lösenord', + 'forgot_password_subheading' => 'Ange %s så vi kan skicka email om lösenordsåterställning.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Skicka', + 'forgot_password_validation_email_label' => 'Email Adress', + 'forgot_password_username_identity_label' => 'Användarnamn', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Email adressen finns inte i vårt register.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Ändra Lösenord', + 'reset_password_new_password_label' => 'Nytt Lösenord (åtminstone %s karaktärer långt):', + 'reset_password_new_password_confirm_label' => 'Bekräfta nytt lösenord:', + 'reset_password_submit_btn' => 'Ändra', + 'reset_password_validation_new_password_label' => 'Nytt Lösenord', + 'reset_password_validation_new_password_confirm_label' => 'Bekräfta nytt lösenord', +]; diff --git a/Language/sv/IonAuth.php b/Language/sv/IonAuth.php new file mode 100644 index 000000000..b3d262b43 --- /dev/null +++ b/Language/sv/IonAuth.php @@ -0,0 +1,78 @@ + 'Kontot har nu skapats', + 'account_creation_unsuccessful' => 'Det gick inte att skapa kontot', + 'account_creation_duplicate_email' => 'E-postadressen är ogiltig eller används redan', + 'account_creation_duplicate_identity' => 'Användarnamnet är ogiltigt eller används redan', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Standard grupp är inte satt', + 'account_creation_invalid_defaultGroup' => 'Ogiltlig standard grupp namn satt', + + + // Password + 'password_change_successful' => 'Lösenordet har nu ändrats', + 'password_change_unsuccessful' => 'Det gick inte att ändra lösenordet', + 'forgot_password_successful' => 'E-postadressen för återställning av lösenord har nu skickats', + 'forgot_password_unsuccessful' => 'Det gick inte att återställa lösenordet', + + // Activation + 'activate_successful' => 'Kontot aktiverades', + 'activate_unsuccessful' => 'Det gick inte att aktivera kontot', + 'deactivate_successful' => 'Kontot inaktiverades', + 'deactivate_unsuccessful' => 'Det gick inte att inaktivera kontot', + 'activation_email_successful' => 'En aktveringslänk har skickats till din e-post', + 'activation_email_unsuccessful' => 'E-post med aktiveringslänk kunde inte skickas', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Du är nu inloggad', + 'login_unsuccessful' => 'Inloggningen misslyckades', + 'login_unsuccessful_not_active' => 'Account is inactive', + 'login_timeout' => 'Temporarily Locked Out. Try again later.', + 'logout_successful' => 'Du är nu utloggad', + + // Account Changes + 'update_successful' => 'Kontouppgifterna uppdaterades', + 'update_unsuccessful' => 'Det gick inte att uppdatera kontouppgifterna', + 'delete_successful' => 'Användaren är borttagen', + 'delete_unsuccessful' => 'Det gick inte att ta bort användaren', + + // Groups + 'group_creation_successful' => 'Group created Successfully', + 'group_already_exists' => 'Group name already taken', + 'group_update_successful' => 'Group details updated', + 'group_delete_successful' => 'Group deleted', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Kontoaktivering', + 'emailActivate_heading' => 'Kontoaktivering för %s', + 'emailActivate_subheading' => 'Klicka denna länk för att %s.', + 'emailActivate_link' => 'aktivera ditt konto', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Glömt lösenordsverifikation', + 'emailForgotPassword_heading' => 'Glömt lösenord för %s', + 'emailForgotPassword_subheading' => 'Klicka denna länk för att %s.', + 'emailForgotPassword_link' => 'återställa ditt lösenord', +]; diff --git a/Language/th/Auth.php b/Language/th/Auth.php new file mode 100644 index 000000000..a0cadea53 --- /dev/null +++ b/Language/th/Auth.php @@ -0,0 +1,155 @@ + 'POST ฟอร์มนี้ไม่ผ่านการตรวจสอบความปลอดภัย', + + // Login + 'login_heading' => 'เข้าสู่ระบบ', + 'login_subheading' => 'โปรดเข้าสู่ระบบโดยกรอกชื่อผู้ใช้/อีเมล์ และรหัสผ่านที่ฟอร์มด้านล่าง', + 'login_identity_label' => 'อีเมล์/ชื่อผู้ใช้:', + 'login_password_label' => 'รหัสผ่าน:', + 'login_remember_label' => 'ให้ฉันอยู่ในระบบต่อไป:', + 'login_submit_btn' => 'เข้าสู่ระบบ', + 'login_forgot_password' => 'ลืมรหัสผ่าน?', + + // Index + 'index_heading' => 'ผู้ใช้ทั้งหมด', + 'index_subheading' => 'รายชื่อผุ้ใช้', + 'index_fname_th' => 'ชื่อ', + 'index_lname_th' => 'นามสกุล', + 'index_email_th' => 'อีเมล์', + 'index_groups_th' => 'กลุ่ม', + 'index_status_th' => 'สถานะ', + 'index_action_th' => 'การกระทำ', + 'index_active_link' => 'กำลังทำงาน', + 'index_inactive_link' => 'ไม่ทำงาน', + 'index_create_user_link' => 'สร้างผู้ใช้ใหม่', + 'index_create_group_link' => 'สร้างกลุ่มใหม่', + + // เลิกใช้งานผู้ใช้ + 'deactivate_heading' => 'เลิกใช้งานผู้ใช้', + 'deactivate_subheading' => 'ยืนยันการเลิกใช้งานผู้ใช้ \'%s\'', + 'deactivate_confirm_y_label' => 'ใช่:', + 'deactivate_confirm_n_label' => 'ไม่:', + 'deactivate_submit_btn' => 'ยอมรับ', + 'deactivate_validation_confirm_label' => 'การยืนยัน', + 'deactivate_validation_user_id_label' => 'รหัสผู้ใช้', + + // สร้าง ผู้ใช้ + 'create_user_heading' => 'สร้าง ผู้ใช้', + 'create_user_subheading' => 'กรุณากรอกรายละเอียดข้อมูลผู้ใช้', + 'create_user_fname_label' => 'ชื่อ:', + 'create_user_lname_label' => 'นามสกุล:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'ชื่อบริษัท:', + 'create_user_email_label' => 'อีเมล์:', + 'create_user_phone_label' => 'หมายเลขโทรศัพท์:', + 'create_user_password_label' => 'รหัสผ่าน:', + 'create_user_password_confirm_label' => 'ยืนยันรหัสผ่าน:', + 'create_user_submit_btn' => 'สร้างผู้ใช้', + 'create_user_validation_fname_label' => 'ชื่อ', + 'create_user_validation_lname_label' => 'นามสกุล', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'ที่อยู่อีเมล์', + 'create_user_validation_phone1_label' => 'หมายเลขโทรศัพท์ส่วนแรก', + 'create_user_validation_phone2_label' => 'หมายเลขโทรศัพท์ส่วนที่สอง', + 'create_user_validation_phone3_label' => 'หมายเลขโทรศัพท์ส่วนที่สาม', + 'create_user_validation_company_label' => 'ชื่อบริษัท', + 'create_user_validation_password_label' => 'รหัสผ่าน', + 'create_user_validation_password_confirm_label' => 'ยืนยันรหัสผ่าน', + + // แก้ไขผู้ใช้ + 'edit_user_heading' => 'แก้ไขผู้ใช้', + 'edit_user_subheading' => 'กรุณากรอกรายละเอียดข้อมูลผู้ใช้', + 'edit_user_fname_label' => 'ชื่อ:', + 'edit_user_lname_label' => 'นามสกุล:', + 'edit_user_company_label' => 'ชื่อบริษัท:', + 'edit_user_email_label' => 'อีเมล์:', + 'edit_user_phone_label' => 'หมายเลขโทรศัพท์:', + 'edit_user_password_label' => 'รหัสผ่าน: (ถ้าจะแก้ไขรหัสผ่าน)', + 'edit_user_password_confirm_label' => 'ยืนยันรหัสผ่าน: (ถ้าจะแก้ไขรหัสผ่าน)', + 'edit_user_groups_heading' => 'สมาชิกในกลุ่ม', + 'edit_user_submit_btn' => 'บันทึกผู้ใช้', + 'edit_user_validation_fname_label' => 'ชื่อ', + 'edit_user_validation_lname_label' => 'นามสกุล', + 'edit_user_validation_email_label' => 'ที่อยู่อีเมล์', + 'edit_user_validation_phone1_label' => 'หมายเลขโทรศัพท์ส่วนแรก', + 'edit_user_validation_phone2_label' => 'หมายเลขโทรศัพท์ส่วนที่สอง', + 'edit_user_validation_phone3_label' => 'หมายเลขโทรศัพท์ส่วนที่สาม', + 'edit_user_validation_company_label' => 'ชื่อบริษัท', + 'edit_user_validation_groups_label' => 'กลุ่ม', + 'edit_user_validation_password_label' => 'รหัสผ่าน', + 'edit_user_validation_password_confirm_label' => 'ยืนยันรหัสผ่าน', + + // สร้างกลุ่ม + 'create_group_title' => 'สร้างกลุ่ม', + 'create_group_heading' => 'สร้างกลุ่ม', + 'create_group_subheading' => 'กรุณากรอกรายละเอียดกลุ่ม', + 'create_group_name_label' => 'ชื่อกลุ่ม:', + 'create_group_desc_label' => 'รายละเอียด:', + 'create_group_submit_btn' => 'สร้างกลุ่ม', + 'create_group_validation_name_label' => 'ชื่อกลุ่ม', + 'create_group_validation_desc_label' => 'รายละเอียด', + + // แก้ไขกลุ่ม + 'edit_group_title' => 'แก้ไขกลุ่ม', + 'edit_group_saved' => 'บันทึกกลุ่มเรียบร้อยแล้ว', + 'edit_group_heading' => 'แก้ไขกลุ่ม', + 'edit_group_subheading' => 'กรุณากรอกรายละเอียดกลุ่ม', + 'edit_group_name_label' => 'ชื่อกลุ่ม:', + 'edit_group_desc_label' => 'รายละเอียด:', + 'edit_group_submit_btn' => 'บันทึกกลุ่ม', + 'edit_group_validation_name_label' => 'ชื่อกลุ่ม', + 'edit_group_validation_desc_label' => 'รายละเอียด', + + // เปลี่ยนรหัสผ่าน + 'change_password_heading' => 'เปลี่ยนรหัสผ่าน', + 'change_password_old_password_label' => 'รหัสผ่านเดิม:', + 'change_password_new_password_label' => 'รหัสผ่านใหม่ (ต้องยาวอย่างอย่างน้อย %s ตัวอักษร):', + 'change_password_new_password_confirm_label' => 'ยืนยันรหัสผ่านใหม่:', + 'change_password_submit_btn' => 'เปลี่ยน', + 'change_password_validation_old_password_label' => 'รหัสผ่านเดิม', + 'change_password_validation_new_password_label' => 'รหัสผ่านใหม่', + 'change_password_validation_new_password_confirm_label' => 'ยืนยันรหัสผ่านใหม่', + + // ลืมรหัสผ่าน + 'forgot_password_heading' => 'ลืมรหัสผ่าน', + 'forgot_password_subheading' => 'กรุณากรอก%sของคุณเพื่อให้เราส่งอีเมล์ยืนยันรหัสผ่านใหม่ให้', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'ยอมรับ', + 'forgot_password_validation_email_label' => 'ที่อยู่อีเมล์', + 'forgot_password_username_identity_label' => 'ชื่อผู้ใช้', + 'forgot_password_email_identity_label' => 'อีเมล์', + 'forgot_password_email_not_found' => 'ไม่พบที่อยู่อีเมล์นี้ในสารบบ', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // ตั้งรหัสผ่านใหม่ + 'reset_password_heading' => 'ตั้งรหัสผ่านใหม่', + 'reset_password_new_password_label' => 'รหัสผ่านใหม่ (ต้องยาวอย่างอย่างน้อย %s ตัวอักษร):', + 'reset_password_new_password_confirm_label' => 'ยืนยันรหัสผ่านใหม่:', + 'reset_password_submit_btn' => 'เปลี่ยน', + 'reset_password_validation_new_password_label' => 'รหัสผ่านใหม่', + 'reset_password_validation_new_password_confirm_label' => 'ยืนยันรหัสผ่านใหม่', +]; diff --git a/Language/th/IonAuth.php b/Language/th/IonAuth.php new file mode 100644 index 000000000..d6d0c0dcc --- /dev/null +++ b/Language/th/IonAuth.php @@ -0,0 +1,81 @@ + 'สร้างบัญชีสำเร็จ', + 'account_creation_unsuccessful' => 'ไม่สามารถสร้างบัญชีได้', + 'account_creation_duplicate_email' => 'อีเมล์นี้ถูกใช้ไปแล้วหรือรูปแบบไม่ถูกต้อง', + 'account_creation_duplicate_identity' => 'ชื่อผู้ใช้นี้ถูกใช้ไปแล้วหรือรูปแบบไม่ถูกต้อง', + 'account_creation_missing_defaultGroup' => 'กลุ่มปริยายยังไม่ถูกตั้ง', + 'account_creation_invalid_defaultGroup' => 'ชื่อกลุ่มปริยายตั้งไม่ถูกต้อง', + + + // Password + 'password_change_successful' => 'เปลี่ยนรหัสผ่านสำเร็จ', + 'password_change_unsuccessful' => 'ไม่สามารถเปลี่ยนรหัสผ่านได้', + 'forgot_password_successful' => 'อีเมล์ล้างรหัสผ่านถูกส่งไปแล้ว', + 'forgot_password_unsuccessful' => 'ไม่สามารถล้างรหัสผ่านได้', + + // Activation + 'activate_successful' => 'บัญชีเปิดใช้แล้ว', + 'activate_unsuccessful' => 'ไม่สามารถเปิดใช้บัญชีได้', + 'deactivate_successful' => 'บัญชีถูกปิดการใช้งานแล้ว', + 'deactivate_unsuccessful' => 'ไม่สามารถปิดการใช้งานบัญชี', + 'activation_email_successful' => 'ส่งอีเมล์เปิดใช้งานแล้ว', + 'activation_email_unsuccessful' => 'ไม่สามารถส่งอีเมล์เปิดใช้งานรหัสผ่านได้', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'เข้าสู่ระบบสำเร็จ', + 'login_unsuccessful' => 'เข้าสู่ระบบไม่ถูกต้อง', + 'login_unsuccessful_not_active' => 'บัญชีนี้ยังไม่เปิดใช้งาน', + 'login_timeout' => 'การเข้าสู่ระบบถูกระงับชั่วคราว กรุณาลองใหม่ในภายหลัง.', + 'logout_successful' => 'ออกจากระบบสำเร็จ', + + // Accounts Changes + 'update_successful' => 'แก้ไขข้อมูลบัญชีสำเร็จ', + 'update_unsuccessful' => 'ไม่สามารถแก้ไขข้อมูลบัญชี', + 'delete_successful' => 'ผู้ใช้ถูกลบแล้ว', + 'delete_unsuccessful' => 'ไม่สามารถลบผู้ใช้ได้', + + // Groups + 'group_creation_successful' => 'สร้างกลุ่มสำเร็จ', + 'group_already_exists' => 'ชื่อกลุ่มถูกใช้ไปแล้ว', + 'group_update_successful' => 'แก้ไขรายละเอียดกลุ่มแล้ว', + 'group_delete_successful' => 'กลุ่มถูกลบแล้ว', + 'group_delete_unsuccessful' => 'ไม่สามารถลบกลุ่มได้', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'ต้องใส่ชื่อกลุ่ม', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'การเปิดใช้บัญชี', + 'emailActivate_heading' => 'เปิดใช้บัญชี %s', + 'emailActivate_subheading' => 'กรุณาคลิกลิงค์นี้เพื่อ%s', + 'emailActivate_link' => 'เปิดใช้Your บัญชี', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'การยืนยันลืมรหัสผ่าน', + 'emailForgotPassword_heading' => 'ล้างรหัสผ่านสำหรับ%s', + 'emailForgotPassword_subheading' => 'กรุณาคลิกลิงค์นี้เพื่อ%s', + 'emailForgotPassword_link' => 'ล้างรหัสผ่าน', +]; diff --git a/Language/tr/Auth.php b/Language/tr/Auth.php new file mode 100644 index 000000000..8dd42b298 --- /dev/null +++ b/Language/tr/Auth.php @@ -0,0 +1,153 @@ + 'Gönderilen form verisi güvenlik kontrolünden geçemedi.', + + // Login + 'login_heading' => 'Giriş', + 'login_subheading' => 'Lütfen kullanıcı adınız/epostanız ve şifreniz ile giriş yapın. ', + 'login_identity_label' => 'Eposta/Kullanıcı Adı:', + 'login_password_label' => 'Şifre:', + 'login_remember_label' => 'Beni Hatırla:', + 'login_submit_btn' => 'Gir', + 'login_forgot_password' => 'Şifrenizi mi unuttunuz ?', + + // Index + 'index_heading' => 'Kullanıcılar', + 'index_subheading' => 'Aşağıdaki kullanıcıların listesidir.', + 'index_fname_th' => 'İsim', + 'index_lname_th' => 'Soyisim', + 'index_email_th' => 'Eposta', + 'index_groups_th' => 'Gruplar', + 'index_status_th' => 'Durum', + 'index_action_th' => 'Eylem', + 'index_active_link' => 'Etkin', + 'index_inactive_link' => 'Etkin Değil', + 'index_create_user_link' => 'Yeni bir kullanıcı oluştur', + 'index_create_group_link' => 'Yeni bir grup oluştur', + + // Deactivate User + 'deactivate_heading' => 'Kullanıcı Devre Dışı Bırakma', + 'deactivate_subheading' => '\'%s\' Kullanıcısını devre dışı bırakmak istediğinizden emin misiniz ?', + 'deactivate_confirm_y_label' => 'Evet:', + 'deactivate_confirm_n_label' => 'Hayır:', + 'deactivate_submit_btn' => 'Kaydet', + 'deactivate_validation_confirm_label' => 'onaylama', + 'deactivate_validation_user_id_label' => 'kullanıcı ID', + + // Create User + 'create_user_heading' => 'Kullanıcı Oluşturma', + 'create_user_subheading' => 'Kullanıcı bilgilerini aşağıya giriniz.', + 'create_user_fname_label' => 'İsim:', + 'create_user_lname_label' => 'Soyisim:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Şirket İsmi:', + 'create_user_email_label' => 'Eposta:', + 'create_user_phone_label' => 'Telefon:', + 'create_user_password_label' => 'Şifre:', + 'create_user_password_confirm_label' => 'Şifre Tekrarı:', + 'create_user_submit_btn' => 'Kullanıcı Oluştur', + 'create_user_validation_fname_label' => 'İsim', + 'create_user_validation_lname_label' => 'Soyisim', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Eposta Adresi', + 'create_user_validation_phone1_label' => 'Telefonun İlk Kısmı', + 'create_user_validation_phone2_label' => 'Telefonun İkinci Kısmı', + 'create_user_validation_phone3_label' => 'Telefonun Üçüncü Kısmı', + 'create_user_validation_company_label' => 'Şirket İsmi', + 'create_user_validation_password_label' => 'Şifre', + 'create_user_validation_password_confirm_label' => 'Şifre Tekrarı', + + // Edit User + 'edit_user_heading' => 'Kullanıcı Düzenleme', + 'edit_user_subheading' => 'Kullanıcı bilgilerini aşağıya giriniz.', + 'edit_user_fname_label' => 'İsim:', + 'edit_user_lname_label' => 'Soyisim:', + 'edit_user_company_label' => 'Şirket İsmi:', + 'edit_user_email_label' => 'Eposta:', + 'edit_user_phone_label' => 'Telefon:', + 'edit_user_password_label' => 'Şifre: (Eğer değişecekse)', + 'edit_user_password_confirm_label' => 'Şifre Tekrarı: (Eğer değişecekse)', + 'edit_user_groups_heading' => 'Üye olduğu gruplar', + 'edit_user_submit_btn' => 'Kullanıcıyı Kaydet', + 'edit_user_validation_fname_label' => 'İsim', + 'edit_user_validation_lname_label' => 'Soyisim', + 'edit_user_validation_email_label' => 'Eposta Adresi', + 'edit_user_validation_phone1_label' => 'Telefonun İlk Kısmı', + 'edit_user_validation_phone2_label' => 'Telefonun İkinci Kısmı', + 'edit_user_validation_phone3_label' => 'Telefonun Üçüncü Kısmı', + 'edit_user_validation_company_label' => 'Şirket İsmi', + 'edit_user_validation_groups_label' => 'Gruplar', + 'edit_user_validation_password_label' => 'Şifre', + 'edit_user_validation_password_confirm_label' => 'Şifre Tekrarı', + + // Create Group + 'create_group_title' => 'Grup Oluşturma', + 'create_group_heading' => 'Grup Oluşturma', + 'create_group_subheading' => 'Grup bilgilerini aşağıya giriniz.', + 'create_group_name_label' => 'Grup İsmi:', + 'create_group_desc_label' => 'Açıklama:', + 'create_group_submit_btn' => 'Grubu Oluştur', + 'create_group_validation_name_label' => 'Grup İsmi', + 'create_group_validation_desc_label' => 'Açıklama', + + // Edit Group + 'edit_group_title' => 'Grup Düzenleme', + 'edit_group_saved' => 'Grup Kaydedildi', + 'edit_group_heading' => 'Grup Düzenleme', + 'edit_group_subheading' => 'Grup bilgilerini aşağıya giriniz.', + 'edit_group_name_label' => 'Grup İsmi:', + 'edit_group_desc_label' => 'Açıklama:', + 'edit_group_submit_btn' => 'Grubu Kaydet', + 'edit_group_validation_name_label' => 'Grup İsmi', + 'edit_group_validation_desc_label' => 'Açıklama', + + // Change Password + 'change_password_heading' => 'Şifre Değiştirme', + 'change_password_old_password_label' => 'Eski Şifre:', + 'change_password_new_password_label' => 'Yeni Şifre (en az %s karakter uzunluğunda):', + 'change_password_new_password_confirm_label' => 'Yeni Şifre Tekrarı:', + 'change_password_submit_btn' => 'Değiştir', + 'change_password_validation_old_password_label' => 'Eski Şifre', + 'change_password_validation_new_password_label' => 'Yeni Şifre', + 'change_password_validation_new_password_confirm_label' => 'Yeni Şifre Tekrarı', + + // Forgot Password + 'forgot_password_heading' => 'Şifremi Unuttum', + 'forgot_password_subheading' => 'Şifrenizi sıfırlamanızı sağlayacak eposta gönderebilmemiz için %s giriniz.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Gönder', + 'forgot_password_validation_email_label' => 'Eposta Adresi', + 'forgot_password_username_identity_label' => 'Kullanıcı Adı', + 'forgot_password_email_identity_label' => 'Eposta', + 'forgot_password_email_not_found' => 'Belirttiğiniz Eposta adresi için bir kayıt bulunamadı.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Şifre Değiştirme', + 'reset_password_new_password_label' => 'Yeni Şifre (en az %s karakter uzunluğunda):', + 'reset_password_new_password_confirm_label' => 'Yeni Şifre Tekrarı:', + 'reset_password_submit_btn' => 'Değiştir', + 'reset_password_validation_new_password_label' => 'Yeni Şifre', + 'reset_password_validation_new_password_confirm_label' => 'Yeni Şifre Tekrarı', + + // Forgot Password Email + 'emailForgotPassword_heading' => '%s İçin Şifre Sıfırlama', + 'emailForgotPassword_subheading' => 'Bağlantıya basarak %s.', + 'emailForgotPassword_link' => 'Şifrenizi Sıfırlayınız', +]; diff --git a/Language/tr/IonAuth.php b/Language/tr/IonAuth.php new file mode 100644 index 000000000..a67605c57 --- /dev/null +++ b/Language/tr/IonAuth.php @@ -0,0 +1,79 @@ + 'Üyelik kaydınız başarıyla tamamlandı', + 'account_creation_unsuccessful' => 'Üyelik kaydınız yapılamadı', + 'account_creation_duplicate_email' => 'E-posta adresi geçersiz ya da daha önceden alınmış', + 'account_creation_duplicate_identity' => 'Kullanıcı adı geçersiz ya da daha önceden alınmış', + 'account_creation_missing_defaultGroup' => 'Herhangi bir varsayılan grup ayarlanmamış', + 'account_creation_invalid_defaultGroup' => 'Geçersiz bir varsayılan grup seçimi', + + // Password + 'password_change_successful' => 'Şifreniz değiştirildi', + 'password_change_unsuccessful' => 'Şifre değiştirme isteği gerçekleştirilemedi', + 'forgot_password_successful' => 'Yeni şifreniz e-posta adresinize gönderildi', + 'forgot_password_unsuccessful' => 'Şifre yenileme isteği gerçekleştirilemedi', + + // Activation + 'activate_successful' => 'Hesap başarıyla etkinleştirildi', + 'activate_unsuccessful' => 'Hesap etkinleştirme başarısız', + 'deactivate_successful' => 'Hesap devre dışı bırakıldı', + 'deactivate_unsuccessful' => 'Hesap devre dışı bırakma isteğiniz gerçekleştirilemedi', + 'activation_email_successful' => 'Hesap etkinleştirme e-postası gönderildi', + 'activation_email_unsuccessful' => 'Hesap etkinleştirme e-postası gönderilemedi', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Giriş başarılı', + 'login_unsuccessful' => 'Giriş başarısız', + 'login_unsuccessful_not_active' => 'Giriş başarısız, hesap aktif değil', + 'login_timeout' => 'Oturum zaman aşımı, daha sonra tekrar deneyiniz.', + 'logout_successful' => 'Çıkış başarılı', + + // Account Changes + 'update_successful' => 'Üyelik bilgileri güncellendi', + 'update_unsuccessful' => 'Üyelik bilgileri güncellenemedi', + 'delete_successful' => 'Kullanıcı silindi', + 'delete_unsuccessful' => 'Kullanıcı silme başarısız', + + // Groups + 'group_creation_successful' => 'Grup başarıyla oluşturuldu', + 'group_already_exists' => 'Grup adı daha önceden oluşturulmuş', + 'group_update_successful' => 'Grup detayları güncellendi', + 'group_delete_successful' => 'Grup silindi ', + 'group_delete_unsuccessful' => 'Grup silinemedi', + 'group_delete_notallowed' => 'Yönetici grup silinemez', + 'group_name_required' => 'Grup adı alanı gereklidir', + 'group_name_admin_not_alter' => 'Yönetici grup adı değiştirilemez', + + // Activation Email + 'emailActivation_subject' => 'Hesap Etkinleştirme', + 'emailActivate_heading' => '%s için hesap etkinleştirme', + 'emailActivate_subheading' => 'Bu linke tıklayarak %s.', + 'emailActivate_link' => 'hesabınızı etkinleştirin', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Şifremi Unuttum', + 'emailForgotPassword_heading' => '%s için şifre sıfırlama', + 'emailForgotPassword_subheading' => 'Bağlantıya tıklayarak %s.', + 'emailForgotPassword_link' => 'şifrenizi sıfırlayınız', +]; diff --git a/Language/uk/Auth.php b/Language/uk/Auth.php new file mode 100644 index 000000000..66985fefc --- /dev/null +++ b/Language/uk/Auth.php @@ -0,0 +1,152 @@ + 'This form post did not pass our security checks.', + + // Login + 'login_heading' => 'Login', + 'login_subheading' => 'Please login with your email/username and password below.', + 'login_identity_label' => 'Email/Username:', + 'login_password_label' => 'Password:', + 'login_remember_label' => 'Remember Me:', + 'login_submit_btn' => 'Login', + 'login_forgot_password' => 'Forgot your password?', + + // Index + 'index_heading' => 'Users', + 'index_subheading' => 'Below is a list of the users.', + 'index_fname_th' => 'First Name', + 'index_lname_th' => 'Last Name', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Groups', + 'index_status_th' => 'Status', + 'index_action_th' => 'Action', + 'index_active_link' => 'Active', + 'index_inactive_link' => 'Inactive', + 'index_create_user_link' => 'Create a new user', + 'index_create_group_link' => 'Create a new group', + + // Deactivate User + 'deactivate_heading' => 'Deactivate User', + 'deactivate_subheading' => 'Are you sure you want to deactivate the user \'%s\'', + 'deactivate_confirm_y_label' => 'Yes:', + 'deactivate_confirm_n_label' => 'No:', + 'deactivate_submit_btn' => 'Submit', + 'deactivate_validation_confirm_label' => 'confirmation', + 'deactivate_validation_user_id_label' => 'user ID', + + // Create User + 'create_user_heading' => 'Create User', + 'create_user_subheading' => 'Please enter the users information below.', + 'create_user_fname_label' => 'First Name:', + 'create_user_lname_label' => 'Last Name:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Company Name:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Phone:', + 'create_user_password_label' => 'Password:', + 'create_user_password_confirm_label' => 'Confirm Password:', + 'create_user_submit_btn' => 'Create User', + 'create_user_validation_fname_label' => 'First Name', + 'create_user_validation_lname_label' => 'Last Name', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email Address', + 'create_user_validation_phone_label' => 'Phone', + 'create_user_validation_company_label' => 'Company Name', + 'create_user_validation_password_label' => 'Password', + 'create_user_validation_password_confirm_label' => 'Password Confirmation', + + // Edit User + 'edit_user_heading' => 'Edit User', + 'edit_user_subheading' => 'Please enter the users information below.', + 'edit_user_fname_label' => 'First Name:', + 'edit_user_lname_label' => 'Last Name:', + 'edit_user_company_label' => 'Company Name:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Phone:', + 'edit_user_password_label' => 'Password: (if changing password)', + 'edit_user_password_confirm_label' => 'Confirm Password: (if changing password)', + 'edit_user_groups_heading' => 'Member of groups', + 'edit_user_submit_btn' => 'Save User', + 'edit_user_validation_fname_label' => 'First Name', + 'edit_user_validation_lname_label' => 'Last Name', + 'edit_user_validation_email_label' => 'Email Address', + 'edit_user_validation_phone_label' => 'Phone', + 'edit_user_validation_company_label' => 'Company Name', + 'edit_user_validation_groups_label' => 'Groups', + 'edit_user_validation_password_label' => 'Password', + 'edit_user_validation_password_confirm_label' => 'Password Confirmation', + + // Create Group + 'create_group_title' => 'Create Group', + 'create_group_heading' => 'Create Group', + 'create_group_subheading' => 'Please enter the group information below.', + 'create_group_name_label' => 'Group Name:', + 'create_group_desc_label' => 'Description:', + 'create_group_submit_btn' => 'Create Group', + 'create_group_validation_name_label' => 'Group Name', + 'create_group_validation_desc_label' => 'Description', + + // Edit Group + 'edit_group_title' => 'Edit Group', + 'edit_group_saved' => 'Group Saved', + 'edit_group_heading' => 'Edit Group', + 'edit_group_subheading' => 'Please enter the group information below.', + 'edit_group_name_label' => 'Group Name:', + 'edit_group_desc_label' => 'Description:', + 'edit_group_submit_btn' => 'Save Group', + 'edit_group_validation_name_label' => 'Group Name', + 'edit_group_validation_desc_label' => 'Description', + + // Change Password + 'change_password_heading' => 'Change Password', + 'change_password_old_password_label' => 'Old Password:', + 'change_password_new_password_label' => 'New Password (at least %s characters long):', + 'change_password_new_password_confirm_label' => 'Confirm New Password:', + 'change_password_submit_btn' => 'Change', + 'change_password_validation_old_password_label' => 'Old Password', + 'change_password_validation_new_password_label' => 'New Password', + 'change_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password + 'forgot_password_heading' => 'Forgot Password', + 'forgot_password_subheading' => 'Please enter your %s so we can send you an email to reset your password.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Submit', + 'forgot_password_validation_email_label' => 'Email Address', + 'forgot_password_username_identity_label' => 'Username', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'No record of that email address.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Change Password', + 'reset_password_new_password_label' => 'New Password (at least %s characters long):', + 'reset_password_new_password_confirm_label' => 'Confirm New Password:', + 'reset_password_submit_btn' => 'Change', + 'reset_password_validation_new_password_label' => 'New Password', + 'reset_password_validation_new_password_confirm_label' => 'Confirm New Password', + + // Forgot Password Email + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/uk/IonAuth.php b/Language/uk/IonAuth.php new file mode 100644 index 000000000..70ee5f4f7 --- /dev/null +++ b/Language/uk/IonAuth.php @@ -0,0 +1,78 @@ + 'Обліковий запис успішно створено', + 'account_creation_unsuccessful' => 'Неможливо створити обліковий запис', + 'account_creation_duplicate_email' => 'Електронна пошта використовується або некоректна', + 'account_creation_duplicate_identity' => 'Ім`я користувача існує або некоректне', + + // TODO Please Translate + 'account_creation_missing_defaultGroup' => 'Група за умовчанням не встановлена', + 'account_creation_invalid_defaultGroup' => 'Група за умовчанням задана некоректно', + + // Password + 'password_change_successful' => 'Пароль успішно змінено', + 'password_change_unsuccessful' => 'Пароль неможливо змінити', + 'forgot_password_successful' => 'Пароль скинутий. На електронну пошту відправлено повідомлення', + 'forgot_password_unsuccessful' => 'Неможливе скидання пароля', + + // Activation + 'activate_successful' => 'Обліковий запис активовано', + 'activate_unsuccessful' => 'Не вдалося активувати обліковий запис', + 'deactivate_successful' => 'Обліковий запис деактивовано', + 'deactivate_unsuccessful' => 'Неможливо деактивувати обліковий запис', + 'activation_email_successful' => 'Повідомлення про активацію відправлено', + 'activation_email_unsuccessful' => 'Повідомлення про активацію неможливо відправити', + 'deactivate_current_user_unsuccessful' => 'Ви не можете самі деактивувати свій обліковий запис', + + // Login / Logout + 'login_successful' => 'Авторизація пройшла успішно', + 'login_unsuccessful' => 'Логін невірний', + 'login_unsuccessful_not_active' => 'Обліковий запис не активований', + 'login_timeout' => 'В цілях безпеки можливість входу тимчасово заблокована. Спробуйте зайти пізніше.', + 'logout_successful' => 'Вихід успішний', + + // Account Changes + 'update_successful' => 'Обліковий запис успішно оновлено', + 'update_unsuccessful' => 'Неможливо оновити обліковий запис', + 'delete_successful' => 'Обліковий запис видалено', + 'delete_unsuccessful' => 'Неможливо видалити обліковий запис', + + // Groups + 'group_creation_successful' => 'Група створена успішно', + 'group_already_exists' => 'Група з таким ім\'ям вже існує', + 'group_update_successful' => 'Дані групи оновлені успішно', + 'group_delete_successful' => 'Група видалена', + 'group_delete_unsuccessful' => 'Не вдалося видалити групу', + 'group_delete_notallowed' => 'Не можна видалити групу адміністраторів', + 'group_name_required' => 'Ім\'я групи обов\'язкове до заповнення', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Активація облікового запису', + 'emailActivate_heading' => 'Активувати акаунт з ім\'ям %s', + 'emailActivate_subheading' => 'Натисніть на посилання %s.', + 'emailActivate_link' => 'Активувати ваш акаунт', + // Forgot Password Email + 'email_forgotten_password_subject' => 'Перевірка забутого пароля', + 'emailForgotPassword_heading' => 'Скидання пароля для користувача %s', + 'emailForgotPassword_subheading' => 'Натисніть на посилання для %s.', + 'emailForgotPassword_link' => 'Відновлення пароля', +]; diff --git a/Language/vi/Auth.php b/Language/vi/Auth.php new file mode 100755 index 000000000..2249b566d --- /dev/null +++ b/Language/vi/Auth.php @@ -0,0 +1,148 @@ + 'Có lỗi xảy ra trong quá trình đăng nhập.', + + // Login + 'login_heading' => 'Đăng nhập', + 'login_subheading' => 'Đăng nhập bằng email.', + 'login_identity_label' => 'Email', + 'login_password_label' => 'Mật khẩu', + 'login_remember_label' => 'Nhớ mật khẩu', + 'login_submit_btn' => 'Đăng nhập', + 'login_forgot_password' => 'Quên mật khẩu?', + + // Index + 'index_heading' => 'Tài khoản', + 'index_subheading' => 'Danh sách tài khoản.', + 'index_fname_th' => 'Tên', + 'index_lname_th' => 'Họ', + 'index_email_th' => 'Email', + 'index_groups_th' => 'Nhóm', + 'index_status_th' => 'Trạng thái', + 'index_action_th' => 'Tác vụ', + 'index_active_link' => 'Kích hoạt', + 'index_inactive_link' => 'Khoá', + 'index_create_user_link' => 'Tạo tài khoản mới', + 'index_create_group_link' => 'Tạo nhóm mới', + + // Deactivate User + 'deactivate_heading' => 'Khoá tài khoản', + 'deactivate_subheading' => 'Bạn có chắc chắn muốn khoá tài khoản \'%s\'', + 'deactivate_confirm_y_label' => 'Có:', + 'deactivate_confirm_n_label' => 'Không:', + 'deactivate_submit_btn' => 'Chấp nhận', + 'deactivate_validation_confirm_label' => 'Xác nhận', + 'deactivate_validation_user_id_label' => 'ID Tài khoản', + + // Create User + 'create_user_heading' => 'Tạo tài khoản', + 'create_user_subheading' => 'Vui lòng nhập các thông tin cần thiết sau.', + 'create_user_fname_label' => 'Tên:', + 'create_user_lname_label' => 'Họ:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => 'Công ty:', + 'create_user_email_label' => 'Email:', + 'create_user_phone_label' => 'Điện thoại:', + 'create_user_password_label' => 'Mật khẩu:', + 'create_user_password_confirm_label' => 'Xác nhận mật khẩu:', + 'create_user_submit_btn' => 'Tạo tài khoản', + 'create_user_validation_fname_label' => 'Tên', + 'create_user_validation_lname_label' => 'Họ', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => 'Email', + 'create_user_validation_phone1_label' => 'Số điện thoại (mã vùng)', + 'create_user_validation_phone2_label' => 'Số điện thoại (3 số đầu)', + 'create_user_validation_phone3_label' => 'Số điện thoại (các số còn lại)', + 'create_user_validation_company_label' => 'Tên công ty', + 'create_user_validation_password_label' => 'Mật khẩu', + 'create_user_validation_password_confirm_label' => 'Xác nhận mật khẩu', + + // Edit User + 'edit_user_heading' => 'Sửa thông tin tài khoản', + 'edit_user_subheading' => 'Vui lòng nhập các thông tin sau.', + 'edit_user_fname_label' => 'Tên:', + 'edit_user_lname_label' => 'Họ:', + 'edit_user_company_label' => 'Tên công ty:', + 'edit_user_email_label' => 'Email:', + 'edit_user_phone_label' => 'Số điện thoại:', + 'edit_user_password_label' => 'Mật khẩu: (nếu có thay đổi)', + 'edit_user_password_confirm_label' => 'Xác nhận mật khẩu: (nếu có thay đổi)', + 'edit_user_groups_heading' => 'Các nhóm tham gia', + 'edit_user_submit_btn' => 'Lưu lại', + 'edit_user_validation_fname_label' => 'Tên', + 'edit_user_validation_lname_label' => 'Họ', + 'edit_user_validation_email_label' => 'Email', + 'edit_user_validation_phone1_label' => 'Số điện thoại (mã vùng)', + 'edit_user_validation_phone2_label' => 'Số điện thoại (3 số đầu)', + 'edit_user_validation_phone3_label' => 'Số điện thoại (các số còn lại)', + 'edit_user_validation_company_label' => 'Tên công ty', + 'edit_user_validation_groups_label' => 'Nhóm', + 'edit_user_validation_password_label' => 'Mật khẩu', + 'edit_user_validation_password_confirm_label' => 'Xác nhận mật khẩu', + + // Create Group + 'create_group_title' => 'Tạo nhóm mới', + 'create_group_heading' => 'Tạo nhóm mới', + 'create_group_subheading' => 'Vui lòng nhập các thông tin bên dưới.', + 'create_group_name_label' => 'Tên nhóm:', + 'create_group_desc_label' => 'Mô tả:', + 'create_group_submit_btn' => 'Tạo nhóm', + 'create_group_validation_name_label' => 'Tên nhóm', + 'create_group_validation_desc_label' => 'Mô tả', + + // Edit Group + 'edit_group_title' => 'Sửa thông tin nhóm', + 'edit_group_saved' => 'Đã lưu', + 'edit_group_heading' => 'Sửa thông tin nhóm', + 'edit_group_subheading' => 'Vui lòng nhập các thông tin bên dưới.', + 'edit_group_name_label' => 'Tên nhóm:', + 'edit_group_desc_label' => 'Mô tả:', + 'edit_group_submit_btn' => 'Lưu lại', + 'edit_group_validation_name_label' => 'Tên nhóm', + 'edit_group_validation_desc_label' => 'Mô tả', + + // Change Password + 'change_password_heading' => 'Đổi mật khẩu', + 'change_password_old_password_label' => 'Mật khẩu cũ:', + 'change_password_new_password_label' => 'Mật khẩu mới (ít nhất %s ký tự):', + 'change_password_new_password_confirm_label' => 'Xác nhận mật khẩu mới:', + 'change_password_submit_btn' => 'Lưu lại', + 'change_password_validation_old_password_label' => 'Mật khẩu cũ', + 'change_password_validation_new_password_label' => 'Mật khẩu mới', + 'change_password_validation_new_password_confirm_label' => 'Xác nhận mật khẩu mới', + + // Forgot Password + 'forgot_password_heading' => 'Quên mật khẩu', + 'forgot_password_subheading' => 'Vui lòng nhập %s để nhận được email khôi phục mật khẩu.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => 'Xác nhận', + 'forgot_password_validation_email_label' => 'Email', + 'forgot_password_username_identity_label' => 'Tài khoản', + 'forgot_password_email_identity_label' => 'Email', + 'forgot_password_email_not_found' => 'Địa chỉ email không tồn tại.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => 'Đổi mật khẩu', + 'reset_password_new_password_label' => 'Mật khẩu mới (ít nhất %s ký tự):', + 'reset_password_new_password_confirm_label' => 'Xác nhận mật khẩu mới:', + 'reset_password_submit_btn' => 'Lưu lại', + 'reset_password_validation_new_password_label' => 'Mật khẩu mới', + 'reset_password_validation_new_password_confirm_label' => 'Xác nhận mật khẩu mới', +]; diff --git a/Language/vi/IonAuth.php b/Language/vi/IonAuth.php new file mode 100755 index 000000000..00a666aea --- /dev/null +++ b/Language/vi/IonAuth.php @@ -0,0 +1,73 @@ + 'Đã khởi tạo tài khoản thành công', + 'account_creation_unsuccessful' => 'Không thể tạo tài khoản vào lúc này', + 'account_creation_duplicate_email' => 'Địa chỉ email không hợp lệ hoặc đã được sử dụng', + 'account_creation_duplicate_identity' => 'Tên tài khoản không hợp lệ hoặc đã được sử dụng', + + // Password + 'password_change_successful' => 'Đã thay đổi mật khẩu thành công', + 'password_change_unsuccessful' => 'Không thể thay đổi mật khẩu vào lúc này', + 'forgot_password_successful' => 'Email khôi phục mật khẩu đã được gửi đi', + 'forgot_password_unsuccessful' => 'Không thể khôi phục mật khẩu vào lúc này', + + // Activation + 'activate_successful' => 'Tài khoản đã được kích hoạt', + 'activate_unsuccessful' => 'Không thể kích hoạt tài khoản vào lúc này', + 'deactivate_successful' => 'Đã khoá tài khoản thành công', + 'deactivate_unsuccessful' => 'Không thể bất khoá tài khoản vào lúc này', + 'activation_email_successful' => 'Đã gửi mail kích hoạt thành công', + 'activation_email_unsuccessful' => 'Không thể gửi mail kích hoạt vào lúc này', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => 'Đăng nhập thành công', + 'login_unsuccessful' => 'Tài khoản hoặc mật khẩu không đúng', + 'login_unsuccessful_not_active' => 'Tài khoản này đã bị khoá', + 'login_timeout' => 'Tài khoản này đã tạm thời bị khoá, vui lòng thử lại sau', + 'logout_successful' => 'Đăng xuất thành công', + + // Account Changes + 'update_successful' => 'Thông tin tài khoản đã được thay đổi thành công', + 'update_unsuccessful' => 'Không thể thay đổi thông tin tài khoản vào lúc này', + 'delete_successful' => 'Đã xoá tài khoản', + 'delete_unsuccessful' => 'Không thể xoá tài khoản vào lúc này', + + // Groups + 'group_creation_successful' => 'Đã tạo nhóm mới thành công', + 'group_already_exists' => 'Tên nhóm bị trùng', + 'group_update_successful' => 'Đã cập nhật thông tin nhóm thành công', + 'group_delete_successful' => 'Đã xoá nhóm', + 'group_delete_unsuccessful' => 'Không thể xoá nhóm vào lúc này', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Vui lòng nhập tên nhóm', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => 'Kích hoạt tài khoản', + 'emailActivate_heading' => 'Kích hoạt tài khoản của %s', + 'emailActivate_subheading' => 'Vui lòng click vào link này để %s.', + 'emailActivate_link' => 'Kích hoạt tài khoản', + + // Forgot Password Email + 'email_forgotten_password_subject' => 'Xác nhận quên mật khẩu', + 'emailForgotPassword_heading' => 'Khôi phục mật khẩu cho %s', + 'emailForgotPassword_subheading' => 'Vui lòng click vào link này để %s.', + 'emailForgotPassword_link' => 'Khôi phục mật khẩu của bạn', +]; diff --git a/Language/zh_cn/Auth.php b/Language/zh_cn/Auth.php new file mode 100644 index 000000000..9ad983530 --- /dev/null +++ b/Language/zh_cn/Auth.php @@ -0,0 +1,159 @@ + '该表单提交未通过我们的安全性检查.', + + // Login + 'login_heading' => '登录', + 'login_subheading' => '请输入下列的邮箱/用户名和密码进行登录.', + 'login_identity_label' => '邮箱/用户名:', + 'login_password_label' => '密码:', + 'login_remember_label' => '记住我:', + 'login_submit_btn' => '登录', + 'login_forgot_password' => '忘记密码?', + + // Index + 'index_heading' => '用户管理', + 'index_subheading' => '下面是用户列表.', + 'index_fname_th' => '名字', + 'index_lname_th' => '姓氏', + 'index_email_th' => '邮箱', + 'index_groups_th' => '用户组', + 'index_status_th' => '状态', + 'index_action_th' => '操作', + 'index_active_link' => '激活', + 'index_inactive_link' => '未激活', + 'index_create_user_link' => '创建用户', + 'index_create_group_link' => '创建用户组', + + // Deactivate User + 'deactivate_heading' => '冻结', + 'deactivate_subheading' => '您确定要冻结用户 \'%s\'', + 'deactivate_confirm_y_label' => '确定:', + 'deactivate_confirm_n_label' => '取消:', + 'deactivate_submit_btn' => '提交', + 'deactivate_validation_confirm_label' => '确认', + 'deactivate_validation_user_id_label' => '用户 ID', + + // Create User + 'create_user_heading' => '创建用户', + 'create_user_subheading' => '请填入以下的用户信息.', + 'create_user_fname_label' => '名字:', + 'create_user_lname_label' => '姓氏:', + 'create_user_identity_label' => 'Identity:', + 'create_user_company_label' => '公司名:', + 'create_user_email_label' => '邮箱地址:', + 'create_user_phone_label' => '电话:', + 'create_user_password_label' => '密码:', + 'create_user_password_confirm_label' => '确认密码:', + 'create_user_submit_btn' => '创建用户', + 'create_user_validation_fname_label' => '名字', + 'create_user_validation_lname_label' => '姓氏', + 'create_user_validation_identity_label' => 'Identity', + 'create_user_validation_email_label' => '邮箱地址', + 'create_user_validation_phone1_label' => '电话号码第一部分', + 'create_user_validation_phone2_label' => '电话号码第二部分', + 'create_user_validation_phone3_label' => '电话号码第三部分', + 'create_user_validation_company_label' => '公司名', + 'create_user_validation_password_label' => '密码', + 'create_user_validation_password_confirm_label' => '确认密码', + + // Edit User + 'edit_user_heading' => '修改用户', + 'edit_user_subheading' => '请输入下列的用户信息.', + 'edit_user_fname_label' => '名字:', + 'edit_user_lname_label' => '姓氏:', + 'edit_user_company_label' => '公司名:', + 'edit_user_email_label' => '邮箱:', + 'edit_user_phone_label' => '电话号码:', + 'edit_user_password_label' => '密码: (如果需要修改请输入)', + 'edit_user_password_confirm_label' => '确认密码: (如果需要修改请输入)', + 'edit_user_groups_heading' => '所在用户组', + 'edit_user_submit_btn' => '保存用户', + 'edit_user_validation_fname_label' => '名字', + 'edit_user_validation_lname_label' => '姓氏', + 'edit_user_validation_email_label' => '邮箱地址', + 'edit_user_validation_phone1_label' => '电话号码第一部分', + 'edit_user_validation_phone2_label' => '电话号码第二部分', + 'edit_user_validation_phone3_label' => '电话号码第三部分', + 'edit_user_validation_company_label' => '公司名', + 'edit_user_validation_groups_label' => '用户组', + 'edit_user_validation_password_label' => '密码', + 'edit_user_validation_password_confirm_label' => '密码确认', + + // Create Group + 'create_group_title' => '创建用户组', + 'create_group_heading' => '创建用户组', + 'create_group_subheading' => '请输入下列用户名信息.', + 'create_group_name_label' => '用户组名:', + 'create_group_desc_label' => '用户组描述:', + 'create_group_submit_btn' => '创建用户组', + 'create_group_validation_name_label' => '用户组名', + 'create_group_validation_desc_label' => '用户组描述', + + // Edit Group + 'edit_group_title' => '修改用户组', + 'edit_group_saved' => '用户组已保存', + 'edit_group_heading' => '修改用户组', + 'edit_group_subheading' => '请输入下列用户名信息.', + 'edit_group_name_label' => '用户组名:', + 'edit_group_desc_label' => '用户组描述:', + 'edit_group_submit_btn' => '用户组已保存', + 'edit_group_validation_name_label' => '用户组名', + 'edit_group_validation_desc_label' => '用户组描述', + + // Change Password + 'change_password_heading' => '修改密码', + 'change_password_old_password_label' => '当前密码:', + 'change_password_new_password_label' => '新密码 (最少 %s 位):', + 'change_password_new_password_confirm_label' => '确认新密码:', + 'change_password_submit_btn' => '修改', + 'change_password_validation_old_password_label' => '当前密码', + 'change_password_validation_new_password_label' => '新密码', + 'change_password_validation_new_password_confirm_label' => '确认新密码', + + // Forgot Password + 'forgot_password_heading' => '忘记密码', + 'forgot_password_subheading' => '请输入您的 %s 以收取邮件重置密码.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => '提交', + 'forgot_password_validation_email_label' => '邮箱地址', + 'forgot_password_username_identity_label' => '用户名', + 'forgot_password_email_identity_label' => '邮箱', + 'forgot_password_email_not_found' => '无此邮箱的记录.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => '修改密码', + 'reset_password_new_password_label' => '新密码 (至少 %s 位):', + 'reset_password_new_password_confirm_label' => '确认新密码:', + 'reset_password_submit_btn' => '修改', + 'reset_password_validation_new_password_label' => '新密码', + 'reset_password_validation_new_password_confirm_label' => '确认新密码', + + // Forgot Password Email + 'emailForgotPassword_heading' => '重置 %s 的密码', + 'emailForgotPassword_subheading' => '请点击连接跳转至 %s.', + 'emailForgotPassword_link' => '重置您的密码', +]; diff --git a/Language/zh_cn/IonAuth.php b/Language/zh_cn/IonAuth.php new file mode 100644 index 000000000..0f7b9f9a1 --- /dev/null +++ b/Language/zh_cn/IonAuth.php @@ -0,0 +1,75 @@ + '账号创建成功', + 'account_creation_unsuccessful' => '账号创建失败', + 'account_creation_duplicate_email' => '电子邮件已被使用或不合法', + 'account_creation_duplicate_identity' => '账号已存在或不合法', + 'account_creation_missing_defaultGroup' => '尚未设定默认群组', + 'account_creation_invalid_defaultGroup' => '默认群组名称不合法', + + // Password + 'password_change_successful' => '密码已修改', + 'password_change_unsuccessful' => '密码修改失败', + 'forgot_password_successful' => '密码已重设,请查收您的电子邮件', + 'forgot_password_unsuccessful' => '密码重设失败', + + // Activation + 'activate_successful' => '账号已激活', + 'activate_unsuccessful' => '账号激活失败', + 'deactivate_successful' => '账号已关闭', + 'deactivate_unsuccessful' => '账号关闭失败', + 'activation_email_successful' => '已发送激活账号的电子邮件', + 'activation_email_unsuccessful' => '发送激活账号的电子邮件失败', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => '登录成功', + 'login_unsuccessful' => '登录失败', + 'login_unsuccessful_not_active' => 'Account is inactive', + 'login_timeout' => 'Temporarily Locked Out. Try again later.', + 'logout_successful' => '您已成功退出', + + // Account Changes + 'update_successful' => '账号资料已更新', + 'update_unsuccessful' => '更新账号资料失败', + 'delete_successful' => '账号已删除', + 'delete_unsuccessful' => '删除账号失败', + + // Groups + 'group_creation_successful' => 'Group created Successfully', + 'group_already_exists' => 'Group name already taken', + 'group_update_successful' => 'Group details updated', + 'group_delete_successful' => 'Group deleted', + 'group_delete_unsuccessful' => 'Unable to delete group', + 'group_delete_notallowed' => 'Can\'t delete the administrators\' group', + 'group_name_required' => 'Group name is a required field', + 'group_name_admin_not_alter' => 'Admin group name can not be changed', + + // Activation Email + 'emailActivation_subject' => '帐号激活', + 'emailActivate_heading' => '激活用户 %s', + 'emailActivate_subheading' => '请点击连接跳转至 %s.', + 'emailActivate_link' => '激活您的账户', + + // Forgot Password Email + 'email_forgotten_password_subject' => '密码重设验证', + 'emailForgotPassword_heading' => 'Reset Password for %s', + 'emailForgotPassword_subheading' => 'Please click this link to %s.', + 'emailForgotPassword_link' => 'Reset Your Password', +]; diff --git a/Language/zh_tw/Auth.php b/Language/zh_tw/Auth.php new file mode 100644 index 000000000..603f64af5 --- /dev/null +++ b/Language/zh_tw/Auth.php @@ -0,0 +1,153 @@ + '此表單內容資訊沒通過系統安全認證.', + + // Login + 'login_heading' => '登入', + 'login_subheading' => '請登入您的電子郵件/帳號和密碼.', + 'login_identity_label' => '電子郵件/帳號:', + 'login_password_label' => '密碼:', + 'login_remember_label' => '記住我:', + 'login_submit_btn' => '登入', + 'login_forgot_password' => '忘記密碼?', + + // Index + 'index_heading' => '使用者資訊', + 'index_subheading' => '底下是帳號資訊列表.', + 'index_fname_th' => '名字', + 'index_lname_th' => '姓氏', + 'index_email_th' => '電子郵件', + 'index_groups_th' => '群組', + 'index_status_th' => '狀態', + 'index_action_th' => '動作', + 'index_active_link' => '啟動', + 'index_inactive_link' => '關閉', + 'index_create_user_link' => '建立新帳號', + 'index_create_group_link' => '建立新群組', + + // Deactivate User + 'deactivate_heading' => '關閉帳號', + 'deactivate_subheading' => '您確定關閉此使用者帳號 \'%s\'', + 'deactivate_confirm_y_label' => '是:', + 'deactivate_confirm_n_label' => '否:', + 'deactivate_submit_btn' => '送出', + 'deactivate_validation_confirm_label' => '確認', + 'deactivate_validation_user_id_label' => '帳號 ID', + + // Create User + 'create_user_heading' => '建立帳號', + 'create_user_subheading' => '請填寫使用者帳號基本資料.', + 'create_user_fname_label' => '名字:', + 'create_user_lname_label' => '姓氏:', + 'create_user_identity_label' => '帳號:', + 'create_user_company_label' => '公司名稱:', + 'create_user_email_label' => '電子郵件:', + 'create_user_phone_label' => '電話:', + 'create_user_password_label' => '密碼:', + 'create_user_password_confirm_label' => '確認密碼:', + 'create_user_submit_btn' => '建立帳號', + 'create_user_validation_fname_label' => '名字', + 'create_user_validation_lname_label' => '姓氏', + 'create_user_validation_identity_label' => '帳號', + 'create_user_validation_email_label' => '電子郵件', + 'create_user_validation_phone1_label' => '聯絡電話一', + 'create_user_validation_phone2_label' => '聯絡電話二', + 'create_user_validation_phone3_label' => '聯絡電話三', + 'create_user_validation_company_label' => '公司名稱', + 'create_user_validation_password_label' => '密碼', + 'create_user_validation_password_confirm_label' => '確認密碼', + + // Edit User + 'edit_user_heading' => '修改帳號', + 'edit_user_subheading' => '請填寫使用者帳號基本資料.', + 'edit_user_fname_label' => '名字:', + 'edit_user_lname_label' => '姓氏:', + 'edit_user_company_label' => '公司名稱:', + 'edit_user_email_label' => '電子郵件:', + 'edit_user_phone_label' => '聯絡電話:', + 'edit_user_password_label' => '密碼: (如果要修改密碼請填寫)', + 'edit_user_password_confirm_label' => '確認密碼: (如果要修改密碼請填寫)', + 'edit_user_groups_heading' => '使用者群組', + 'edit_user_submit_btn' => '儲存帳號', + 'edit_user_validation_fname_label' => '名字', + 'edit_user_validation_lname_label' => '姓氏', + 'edit_user_validation_email_label' => '電子郵件', + 'edit_user_validation_phone1_label' => '聯絡電話一', + 'edit_user_validation_phone2_label' => '聯絡電話二', + 'edit_user_validation_phone3_label' => '聯絡電話三', + 'edit_user_validation_company_label' => '公司名稱', + 'edit_user_validation_groups_label' => '群組', + 'edit_user_validation_password_label' => '密碼', + 'edit_user_validation_password_confirm_label' => '確認密碼', + + // Create Group + 'create_group_title' => '建立群組', + 'create_group_heading' => '建立群組', + 'create_group_subheading' => '請填寫群組基本資料.', + 'create_group_name_label' => '群組名稱:', + 'create_group_desc_label' => '群組描述:', + 'create_group_submit_btn' => '建立群組', + 'create_group_validation_name_label' => '群組名稱', + 'create_group_validation_desc_label' => '群組描述', + + // Edit Group + 'edit_group_title' => '修改群組', + 'edit_group_saved' => '儲存群組', + 'edit_group_heading' => '修改群組', + 'edit_group_subheading' => '請填寫群組基本資料.', + 'edit_group_name_label' => '群組名稱:', + 'edit_group_desc_label' => '群組描述:', + 'edit_group_submit_btn' => '儲存群組', + 'edit_group_validation_name_label' => '群組名稱', + 'edit_group_validation_desc_label' => '群組描述', + + // Change Password + 'change_password_heading' => '修改密碼', + 'change_password_old_password_label' => '舊密碼:', + 'change_password_new_password_label' => '新密碼 (至少含 %s 字元長度):', + 'change_password_new_password_confirm_label' => '確認新密碼:', + 'change_password_submit_btn' => '修改', + 'change_password_validation_old_password_label' => '舊密碼', + 'change_password_validation_new_password_label' => '新密碼', + 'change_password_validation_new_password_confirm_label' => '確認新密碼', + + // Forgot Password + 'forgot_password_heading' => '忘記密碼', + 'forgot_password_subheading' => '請填寫您的%s,以便讓我們寄送電子郵件重新啟用密碼.', + 'forgot_password_email_label' => '%s:', + 'forgot_password_submit_btn' => '送出', + 'forgot_password_validation_email_label' => '電子郵件', + 'forgot_password_username_identity_label' => '帳號', + 'forgot_password_email_identity_label' => '電子郵件', + 'forgot_password_email_not_found' => '找不到此電子郵件相關資訊.', + 'forgot_password_identity_not_found' => 'No record of that username address.', + + // Reset Password + 'reset_password_heading' => '修改密碼', + 'reset_password_new_password_label' => '新密碼 (至少含 %s 字元長度):', + 'reset_password_new_password_confirm_label' => '確認新密碼:', + 'reset_password_submit_btn' => '修改', + 'reset_password_validation_new_password_label' => '新密碼', + 'reset_password_validation_new_password_confirm_label' => '確認新密碼', +]; diff --git a/Language/zh_tw/IonAuth.php b/Language/zh_tw/IonAuth.php new file mode 100644 index 000000000..9fda12f1b --- /dev/null +++ b/Language/zh_tw/IonAuth.php @@ -0,0 +1,80 @@ + '帳號建立成功', + 'account_creation_unsuccessful' => '無法建立帳號', + 'account_creation_duplicate_email' => '電子郵件已被使用或不合法', + 'account_creation_duplicate_identity' => '帳號已存在或不合法', + 'account_creation_missing_defaultGroup' => '尚未設定預設群組', + 'account_creation_invalid_defaultGroup' => '預設群組名稱不合法', + + // Password + 'password_change_successful' => '密碼變更成功', + 'password_change_unsuccessful' => '密碼變更失敗', + 'forgot_password_successful' => '密碼已重設,請收取電子郵件', + 'forgot_password_unsuccessful' => '密碼重設失敗', + + // Activation + 'activate_successful' => '帳號已啟動', + 'activate_unsuccessful' => '啟動帳號失敗', + 'deactivate_successful' => '帳號已關閉', + 'deactivate_unsuccessful' => '關閉帳號失敗', + 'activation_email_successful' => '已寄送啟動帳號電子郵件', + 'activation_email_unsuccessful' => '啟動帳號電子郵件失敗', + 'deactivate_current_user_unsuccessful'=> 'You cannot De-Activate your self.', + + // Login / Logout + 'login_successful' => '登入成功', + 'login_unsuccessful' => '登入失敗', + 'login_unsuccessful_not_active' => '帳號尚未啟動', + 'login_timeout' => '帳號暫時被鎖定,請稍候再試', + 'logout_successful' => '登出成功', + + // Account Changes + 'update_successful' => '帳號資料更新成功', + 'update_unsuccessful' => '更新帳號資料失敗', + 'delete_successful' => '帳號已刪除', + 'delete_unsuccessful' => '刪除帳號失敗', + + // Groups + 'group_creation_successful' => '建立群組成功', + 'group_already_exists' => '群組名稱已重複', + 'group_update_successful' => '更新群組成功', + 'group_delete_successful' => '群組已刪除', + 'group_delete_unsuccessful' => '刪除群組失敗', + 'group_delete_notallowed' => '無法刪除管理者群組', + 'group_name_required' => '群組名稱為必填欄位', + 'group_name_admin_not_alter' => '不能變更管理者群組名稱', + + // Activation Email + 'emailActivation_subject' => '啟動帳號', + 'emailActivate_heading' => '啟動帳號 %s', + 'emailActivate_subheading' => '請點此連結 %s', + 'emailActivate_link' => '啟動您的帳號', + + // Forgot Password Email + 'email_forgotten_password_subject' => '密碼重設驗證', + 'emailForgotPassword_heading' => '重新啟用密碼 %s', + 'emailForgotPassword_subheading' => '請點此連結 %s', + 'emailForgotPassword_link' => '重新啟動密碼', +]; diff --git a/Libraries/IonAuth.php b/Libraries/IonAuth.php new file mode 100644 index 000000000..b395ca37e --- /dev/null +++ b/Libraries/IonAuth.php @@ -0,0 +1,416 @@ + + * @author Phil Sturgeon + * @author Benoit VRIGNAUD + * @license https://opensource.org/licenses/MIT MIT License + * @link http://github.com/benedmunds/CodeIgniter-Ion-Auth + * @filesource + */ + +/** + * This class is the IonAuth library. + */ +class IonAuth +{ + /** + * Configuration + * + * @var \IonAuth\Config\IonAuth + */ + private $config; + + /** + * IonAuth model + * + * @var \IonAuth\Models\IonAuthModel + */ + private $ionAuthModel; + + /** + * Email class + * + * @var \CodeIgniter\Email\Email + */ + protected $email; + + /** + * __construct + * + * @author Ben + */ + public function __construct() + { + // Check compat first + $this->checkCompatibility(); + + $this->config = config('IonAuth\\Config\\IonAuth'); + + $this->email = \Config\Services::email(); + helper('cookie'); + + $this->session = session(); + + $this->ionAuthModel = new \IonAuth\Models\IonAuthModel(); + + $emailConfig = $this->config->emailConfig; + + if ($this->config->useCiEmail && isset($emailConfig) && is_array($emailConfig)) + { + $this->email->initialize($emailConfig); + } + + $this->ionAuthModel->triggerEvents('library_constructor'); + } + + /** + * __call + * + * Acts as a simple way to call model methods without loads of stupid alias' + * + * @param string $method Method to call + * @param array $arguments Method arguments + * + * @return mixed + * @throws Exception When $method is undefined. + */ + public function __call(string $method, array $arguments) + { + if (! method_exists( $this->ionAuthModel, $method)) + { + throw new \Exception('Undefined method Ion_auth::' . $method . '() called'); + } + if ($method === 'create_user') + { + return call_user_func_array([$this, 'register'], $arguments); + } + if ($method === 'update_user') + { + return call_user_func_array([$this, 'update'], $arguments); + } + return call_user_func_array([$this->ionAuthModel, $method], $arguments); + } + + /** + * Forgotten password feature + * + * @param string $identity Identity + * + * @return array|boolean + * @author Mathew + */ + public function forgottenPassword(string $identity) + { + // Retrieve user information + $user = $this->where($this->ionAuthModel->identityColumn, $identity) + ->where('active', 1) + ->users()->row(); + + if ($user) + { + // Generate code + $code = $this->ionAuthModel->forgottenPassword($identity); + + if ($code) + { + $data = [ + 'identity' => $identity, + 'forgottenPasswordCode' => $code, + ]; + + if (! $this->config->useCiEmail) + { + $this->setMessage('IonAuth.forgot_password_successful'); + return $data; + } + else + { + $message = view($this->config->emailTemplates . $this->config->emailForgotPassword, $data); + $this->email->clear(); + $this->email->setFrom($this->config->adminEmail, $this->config->siteTitle); + $this->email->setTo($user->email); + $this->email->setSubject($this->config->siteTitle . ' - ' . lang('IonAuth.email_forgotten_password_subject')); + $this->email->setMessage($message); + if ($this->email->send()) + { + $this->setMessage('IonAuth.forgot_password_successful'); + return true; + } + } + } + } + + $this->setError('IonAuth.forgot_password_unsuccessful'); + return false; + } + + /** + * Forgotten password check + * + * @param string $code Code + * + * @return object|boolean + * @author Michael + */ + public function forgottenPasswordCheck(string $code) + { + $user = $this->ionAuthModel->getUserByForgottenPasswordCode($code); + + if (! is_object($user)) + { + $this->setError('IonAuth.password_change_unsuccessful'); + return false; + } + else + { + if ($this->config->forgotPasswordExpiration > 0) + { + //Make sure it isn't expired + $expiration = $this->config->forgotPasswordExpiration; + if (time() - $user->forgotten_password_time > $expiration) + { + //it has expired + $identity = $user->{$this->config->identity}; + $this->ionAuthModel->clearForgottenPasswordCode($identity); + $this->setError('IonAuth.password_change_unsuccessful'); + return false; + } + } + return $user; + } + } + + /** + * Register + * + * @param string $identity Identity + * @param string $password Password + * @param string $email Email + * @param array $additionalData Additional data + * @param array $groupIds Groups id + * + * @return integer|array|boolean The new user's ID if e-mail activation is disabled or Ion-Auth e-mail activation + * was completed; + * or an array of activation details if CI e-mail validation is enabled; or false + * if the operation failed. + * @author Mathew + */ + public function register(string $identity, string $password, string $email, array $additionalData = [], array $groupIds = []) + { + $this->ionAuthModel->triggerEvents('pre_account_creation'); + + $emailActivation = $this->config->emailActivation; + + $id = $this->ionAuthModel->register($identity, $password, $email, $additionalData, $groupIds); + + if (! $emailActivation) + { + if ($id !== false) + { + $this->setMessage('IonAuth.account_creation_successful'); + $this->ionAuthModel->triggerEvents(['post_account_creation', 'post_account_creation_successful']); + return $id; + } + else + { + $this->setError('IonAuth.account_creation_unsuccessful'); + $this->ionAuthModel->triggerEvents(['post_account_creation', 'post_account_creation_unsuccessful']); + return false; + } + } + else + { + if (! $id) + { + $this->setError('IonAuth.account_creation_unsuccessful'); + return false; + } + + // deactivate so the user must follow the activation flow + $deactivate = $this->ionAuthModel->deactivate($id); + + // the deactivate method call adds a message, here we need to clear that + $this->ionAuthModel->clearMessages(); + + if (! $deactivate) + { + $this->setError('IonAuth.deactivate_unsuccessful'); + $this->ionAuthModel->triggerEvents(['post_account_creation', 'post_account_creation_unsuccessful']); + return false; + } + + $activationCode = $this->ionAuthModel->activation_code; + $identity = $this->config->identity; + $user = $this->ionAuthModel->user($id)->row(); + + $data = [ + 'identity' => $user->{$identity}, + 'id' => $user->id, + 'email' => $email, + 'activation' => $activationCode, + ]; + if (! $this->config->useCiEmail) + { + $this->ionAuthModel->triggerEvents(['post_account_creation', 'post_account_creation_successful', 'activation_email_successful']); + $this->setMessage('IonAuth.activation_email_successful'); + return $data; + } + else + { + $message = view($this->config->emailTemplates . $this->config->emailActivate, $data); + + $this->email->clear(); + $this->email->setFrom($this->config->adminEmail, $this->config->siteTitle); + $this->email->setTo($email); + $this->email->setSubject($this->config->siteTitle . ' - ' . lang('IonAuth.emailActivation_subject')); + $this->email->setMessage($message); + + if ($this->email->send() === true) + { + $this->ionAuthModel->triggerEvents(['post_account_creation', 'post_account_creation_successful', 'activation_email_successful']); + $this->setMessage('IonAuth.activation_email_successful'); + return $id; + } + } + + $this->ionAuthModel->triggerEvents(['post_account_creation', 'post_account_creation_unsuccessful', 'activation_email_unsuccessful']); + $this->setError('IonAuth.activation_email_unsuccessful'); + return false; + } + } + + /** + * Logout + * + * @return true + * @author Mathew + */ + public function logout(): bool + { + $this->ionAuthModel->triggerEvents('logout'); + + $identity = $this->config->identity; + + $this->session->remove([$identity, 'id', 'user_id']); + + // delete the remember me cookies if they exist + delete_cookie($this->config->rememberCookieName); + + // Clear all codes + $this->ionAuthModel->clearForgottenPasswordCode($identity); + $this->ionAuthModel->clearRememberCode($identity); + + // Destroy the session + $this->session->destroy(); + + // Recreate the session + session_start(); + + session_regenerate_id(true); + + $this->setMessage('IonAuth.logout_successful'); + return true; + } + + /** + * Auto logs-in the user if they are remembered + * + * @author Mathew + * + * @return boolean Whether the user is logged in + */ + public function loggedIn(): bool + { + $this->ionAuthModel->triggerEvents('logged_in'); + + $recheck = $this->ionAuthModel->recheckSession(); + + // auto-login the user if they are remembered + if (! $recheck && get_cookie($this->config->rememberCookieName)) + { + $recheck = $this->ionAuthModel->loginRememberedUser(); + } + + return $recheck; + } + + /** + * Get user id + * + * @return integer|null The user's ID from the session user data or NULL if not found + * @author jrmadsen67 + **/ + public function getUserId() + { + $userId = $this->session->get('user_id'); + if (! empty($userId)) + { + return $userId; + } + return null; + } + + /** + * Check to see if the currently logged in user is an admin. + * + * @param integer $id User id + * + * @return boolean Whether the user is an administrator + * @author Ben Edmunds + */ + public function isAdmin(int $id = 0): bool + { + $this->ionAuthModel->triggerEvents('is_admin'); + + $adminGroup = $this->config->adminGroup; + + return $this->ionAuthModel->inGroup($adminGroup, $id); + } + + /** + * Check the compatibility with the server + * + * Script will die in case of error + * + * @return void + */ + protected function checkCompatibility() + { + // I think we can remove this method + + /* + // PHP password_* function sanity check + if (!function_exists('password_hash') || !function_exists('password_verify')) + { + show_error("PHP function password_hash or password_verify not found. " . + "Are you using CI 2 and PHP < 5.5? " . + "Please upgrade to CI 3, or PHP >= 5.5 " . + "or use password_compat (https://github.com/ircmaxell/password_compat)."); + } + */ + + /* + // Compatibility check for CSPRNG + // See functions used in Ion_auth_model::randomToken() + if (!function_exists('random_bytes') && !function_exists('mcrypt_create_iv') && !function_exists('openssl_random_pseudo_bytes')) + { + show_error("No CSPRNG functions to generate random enough token. " . + "Please update to PHP 7 or use random_compat (https://github.com/paragonie/random_compat)."); + } + */ + } + +} diff --git a/Models/IonAuthModel.php b/Models/IonAuthModel.php new file mode 100644 index 000000000..6d12a5b88 --- /dev/null +++ b/Models/IonAuthModel.php @@ -0,0 +1,2758 @@ + + * @author Phil Sturgeon + * @author Benoit VRIGNAUD + * @license https://opensource.org/licenses/MIT MIT License + * @link http://github.com/benedmunds/CodeIgniter-Ion-Auth + * @filesource + */ + +use \CodeIgniter\Database\ConnectionInterface; + +/** + * Class IonAuthModel + * + * @property Ion_auth $ion_auth The Ion_auth library + */ +class IonAuthModel +{ + /** + * Max cookie lifetime constant + */ + const MAX_COOKIE_LIFETIME = 63072000; // 2 years = 60*60*24*365*2 = 63072000 seconds; + + /** + * Max password size constant + */ + const MAX_PASSWORD_SIZE_BYTES = 4096; + + /** + * IonAuth config + * + * @var Config\IonAuth + */ + private $config; + + /** + * CodeIgniter session + * + * @var \CodeIgniter\Session\Session + */ + private $session; + + /** + * Holds an array of tables used + * + * @var array + */ + public $tables = []; + + /** + * Activation code + * + * Set by deactivate() function + * Also set on register() function, if email_activation + * option is activated + * + * This is the value devs should give to the user + * (in an email, usually) + * + * It contains the *user* version of the activation code + * It's a value of the form "selector.validator" + * + * This is not the same activationCode as the one in DB. + * The DB contains a *hashed* version of the validator + * and a selector in another column. + * + * THe selector is not private, and only used to lookup + * the validator. + * + * The validator is private, and to be only known by the user + * So in case of DB leak, nothing could be actually used. + * + * @var string + */ + public $activationCode; + + /** + * Identity column + * + * @var string + */ + public $identityColumn; + + /** + * Where + * + * @var array + */ + protected $ionWhere = []; + + /** + * Select + * + * @var array + */ + protected $ionSelect = []; + + /** + * Like + * + * @var array + */ + protected $ionLike = []; + + /** + * Limit + * + * @var string + */ + protected $ionLimit = null; + + /** + * Offset + * + * @var string + */ + protected $ionOffset = null; + + /** + * Order By + * + * @var string + */ + protected $ionOrderBy = null; + + /** + * Order + * + * @var string + */ + protected $ionOrder = null; + + /** + * Hooks + * + * @var object + */ + protected $ionHooks; + + /** + * Response + * + * @var \CodeIgniter\Database\ResultInterface + */ + protected $response = null; + + /** + * Message (uses lang file) + * + * @var string + */ + protected $messages = []; + + /** + * Error message (uses lang file) + * + * @var string + */ + protected $errors = []; + + /** + * Message templates (single, list). + * + * @var array + */ + protected $messageTemplates = []; + + /** + * Caching of users and their groups + * + * @var array + */ + protected $cacheUserInGroup = []; + + /** + * Caching of groups + * + * @var array + */ + protected $cacheGroups = []; + + /** + * Database object + * + * @var \CodeIgniter\Database\BaseConnection + */ + protected $db; + + /** + * Constructor + * + * @return void + */ + public function __construct() + { + $this->config = config('IonAuth\\Config\\IonAuth'); + helper(['cookie', 'date']); + $this->session = session(); + + // initialize the database + if (empty($this->config->databaseGroupName)) + { + // By default, use CI's db that should be already loaded + $this->db = \Config\Database::connect(); + } + else + { + // For specific group name, open a new specific connection + $this->db = \Config\Database::connect($this->config->databaseGroupName); + } + + // initialize db tables data + $this->tables = $this->config->tables; + + // initialize data + $this->identityColumn = $this->config->identity; + $this->join = $this->config->join; + + // initialize hash method options (Bcrypt) + $this->hashMethod = $this->config->hashMethod; + + // load the messages template from the config file + $this->messagesTemplates = $this->config->templates['messages']; + + // initialize our hooks object + $this->ionHooks = new \stdClass(); + + $this->triggerEvents('model_constructor'); + } + + /** + * Getter to the DB connection used by Ion Auth + * May prove useful for debugging + * + * @return object + */ + public function db() + { + return $this->db; + } + + /** + * Hashes the password to be stored in the database. + * + * @param string $password Password + * @param string $identity Identity + * + * @return false|string + * @author Mathew + */ + public function hashPassword(string $password, string $identity = '') + { + // Check for empty password, or password containing null char, or password above limit + // Null char may pose issue: http://php.net/manual/en/function.password-hash.php#118603 + // Long password may pose DOS issue (note: strlen gives size in bytes and not in multibyte symbol) + if (empty($password) || strpos($password, "\0") !== false || + strlen($password) > self::MAX_PASSWORD_SIZE_BYTES) + { + return false; + } + + $algo = $this->getHashAlgo(); + $params = $this->getHashParameters($identity); + + if ($algo !== false && $params !== false) + { + return password_hash($password, $algo, $params); + } + + return false; + } + + /** + * This function takes a password and validates it + * against an entry in the users table. + * + * @param string $password Password + * @param string $hashPasswordDb + * @param string $identity Optional @deprecated only for BC SHA1 + * + * @return boolean + * @author Mathew + */ + public function verifyPassword(string $password, string $hashPasswordDb, string $identity = ''): bool + { + // Check for empty id or password, or password containing null char, or password above limit + // Null char may pose issue: http://php.net/manual/en/function.password-hash.php#118603 + // Long password may pose DOS issue (note: strlen gives size in bytes and not in multibyte symbol) + if (empty($password) || empty($hashPasswordDb) || strpos($password, "\0") !== false + || strlen($password) > self::MAX_PASSWORD_SIZE_BYTES) + { + return false; + } + + return password_verify($password, $hashPasswordDb); + } + + /** + * Check if password needs to be rehashed + * If true, then rehash and update it in DB + * + * @param string $hash Hash + * @param string $identity Identity + * @param string $password Password + * + * @return void + */ + public function rehashPasswordIfNeeded(string $hash, string $identity, string $password): void + { + $algo = $this->getHashAlgo(); + $params = $this->getHashParameters($identity); + + if ($algo !== false && $params !== false) + { + if (password_needs_rehash($hash, $algo, $params)) + { + if ($this->setPasswordDb($identity, $password)) + { + $this->triggerEvents(['rehash_password', 'rehash_password_successful']); + } + else + { + $this->triggerEvents(['rehash_password', 'rehash_password_unsuccessful']); + } + } + } + } + + /** + * Get a user by its activation code + * + * @param string $userCode The activation code + * It's the *user* one, containing "selector.validator" + * the one you got in activation_code member + * + * @return boolean|object + * @author Indigo + */ + public function getUserByActivationCode(string $userCode) + { + // Retrieve the token object from the code + $token = $this->retrieveSelectorValidatorCouple($userCode); + + // Retrieve the user according to this selector + $user = $this->where('activation_selector', $token->selector)->users()->row(); + + if ($user) + { + // Check the hash against the validator + if ($this->verifyPassword($token->validator, $user->activation_code)) + { + return $user; + } + } + + return false; + } + + /** + * Validates and removes activation code. + * + * @param integer|string $id The user identifier + * @param boolean $code The *user* activation code + * if omitted, simply activate the user without check + * + * @return boolean + * @author Mathew + */ + public function activate($id, bool $code = false): bool + { + $this->triggerEvents('pre_activate'); + + if ($code !== false) + { + $user = $this->getUserByActivationCode($code); + } + // Activate if no code is given + // Or if a user was found with this code, and that it matches the id + if ($code === false || ($user && $user->id === $id)) + { + $data = [ + 'activation_selector' => null, + 'activation_code' => null, + 'active' => 1, + ]; + + $this->triggerEvents('extra_where'); + $this->db->table($this->tables['users'])->update($data, ['id' => $id]); + + if ($this->db->affectedRows() === 1) + { + $this->triggerEvents(['post_activate', 'post_activate_successful']); + $this->setMessage('IonAuth.activate_successful'); + return true; + } + } + + $this->triggerEvents(['post_activate', 'post_activate_unsuccessful']); + $this->setError('IonAuth.activate_unsuccessful'); + return false; + } + + /** + * Updates a users row with an activation code. + * + * @param integer $id User id + * + * @return boolean + * @author Mathew + */ + public function deactivate(int $id = 0): bool + { + $this->triggerEvents('deactivate'); + + if (! $id) + { + $this->setError('IonAuth.deactivate_unsuccessful'); + return false; + } + else if ((new \IonAuth\Libraries\IonAuth())->loggedIn() && $this->user()->row()->id === $id) + { + $this->setError('IonAuth.deactivate_current_user_unsuccessful'); + return false; + } + + $token = $this->generateSelectorValidatorCouple(20, 40); + $this->activationCode = $token->userCode; + + $data = [ + 'activation_selector' => $token->selector, + 'activation_code' => $token->validatorHashed, + 'active' => 0, + ]; + + $this->triggerEvents('extra_where'); + $this->db->table($this->tables['users'])->update($data, ['id' => $id]); + + $return = $this->db->affectedRows() === 1; + if ($return) + { + $this->setMessage('IonAuth.deactivate_successful'); + } + else + { + $this->setError('IonAuth.deactivate_unsuccessful'); + } + + return $return; + } + + /** + * Clear the forgotten password code for a user + * + * @param string $identity Identity + * + * @return boolean Success + */ + public function clearForgottenPasswordCode(string $identity): bool + { + if (empty($identity)) + { + return false; + } + + $data = [ + 'forgotten_password_selector' => null, + 'forgotten_password_code' => null, + 'forgotten_password_time' => null, + ]; + + return $this->db->table($this->tables['users'])->update($data, [$this->identityColumn => $identity]); + } + + /** + * Clear the remember code for a user + * + * @param string $identity Identity + * + * @return boolean Success + */ + public function clearRememberCode(string $identity): bool + { + if (empty($identity)) + { + return false; + } + + $data = [ + 'remember_selector' => null, + 'remember_code' => null, + ]; + + return $this->db->table($this->tables['users'])->update($data, [$this->identityColumn => $identity]); + } + + /** + * Reset password + * + * @param string $identity Identity + * @param string $new New password + * + * @return boolean + * @author Mathew + */ + public function resetPassword(string $identity, string $new) + { + $this->triggerEvents('pre_change_password'); + + if (! $this->identityCheck($identity)) + { + $this->triggerEvents(['post_change_password', 'post_change_password_unsuccessful']); + return false; + } + + $return = $this->setPasswordDb($identity, $new); + + if ($return) + { + $this->triggerEvents(['post_change_password', 'post_change_password_successful']); + $this->setMessage('IonAuth.password_change_successful'); + } + else + { + $this->triggerEvents(['post_change_password', 'post_change_password_unsuccessful']); + $this->setError('IonAuth.password_change_unsuccessful'); + } + + return $return; + } + + /** + * Change password + * + * @param string $identity Identity + * @param string $old Old password + * @param string $new New password + * + * @return boolean + * @author Mathew + */ + public function changePassword(string $identity, string $old, string $new): bool + { + $this->triggerEvents('pre_change_password'); + + $this->triggerEvents('extra_where'); + + $query = $this->db->select('id, password') + ->where($this->identityColumn, $identity) + ->limit(1) + ->orderBy('id', 'desc') + ->get($this->tables['users']); + + if ($query->numRows() !== 1) + { + $this->triggerEvents(['post_change_password', 'post_change_password_unsuccessful']); + $this->setError('IonAuth.password_change_unsuccessful'); + return false; + } + + $user = $query->row(); + + if ($this->verifyPassword($old, $user->password, $identity)) + { + $result = $this->setPasswordDb($identity, $new); + + if ($result) + { + $this->triggerEvents(['post_change_password', 'post_change_password_successful']); + $this->setMessage('IonAuth.password_change_successful'); + } + else + { + $this->triggerEvents(['post_change_password', 'post_change_password_unsuccessful']); + $this->setError('IonAuth.password_change_unsuccessful'); + } + + return $result; + } + + $this->setError('IonAuth.password_change_unsuccessful'); + return false; + } + + /** + * Checks username + * + * @param string $username User name + * + * @return boolean + * @author Mathew + */ + public function usernameCheck(string $username): bool + { + $this->triggerEvents('username_check'); + + if (empty($username)) + { + return false; + } + + $this->triggerEvents('extra_where'); + + return $this->db->where('username', $username) + ->limit(1) + ->count_all_results($this->tables['users']) > 0; + } + + /** + * Checks email to see if the email is already registered. + * + * @param string $email Email to check + * + * @return boolean true if the user is registered false if the user is not registered. + * @author Mathew + */ + public function emailCheck(string $email = ''): bool + { + $this->triggerEvents('emailCheck'); + + if (empty($email)) + { + return false; + } + + $this->triggerEvents('extra_where'); + + return $this->db->table($this->tables['users']) + ->where('email', $email) + ->limit(1) + ->countAllResults() > 0; + } + + /** + * Identity check : Check to see if the identity is already registered + * + * @param string $identity Identity + * + * @return boolean + * @author Mathew + */ + public function identityCheck(string $identity = ''): bool + { + $this->triggerEvents('identity_check'); + + if (empty($identity)) + { + return false; + } + + $builder = $this->db->table($this->tables['users']); + return $builder->where($this->identityColumn, $identity) + ->limit(1) + ->countAllResults() > 0; + } + + /** + * Get user ID from identity + * + * @param string $identity Identity + * + * @return boolean|integer + */ + public function getUserIdFromIdentity(string $identity = '') + { + if (empty($identity)) + { + return false; + } + + $builder = $this->db->table($this->tables['users']); + $query = $builder->select('id') + ->where($this->identityColumn, $identity) + ->limit(1) + ->get(); + + $user = $query->getRow(); + + if ($user) + { + return $user->id; + } + + return false; + } + + /** + * Insert a forgotten password key. + * + * @param string $identity As defined in Config/IonAuth + * + * @return boolean|string + * + * @author Mathew + * @author Ryan + */ + public function forgottenPassword(string $identity) + { + if (empty($identity)) + { + $this->triggerEvents(['post_forgotten_password', 'post_forgotten_password_unsuccessful']); + return false; + } + + // Generate random token: smaller size because it will be in the URL + $token = $this->generateSelectorValidatorCouple(20, 80); + + $update = [ + 'forgotten_password_selector' => $token->selector, + 'forgotten_password_code' => $token->validatorHashed, + 'forgotten_password_time' => time(), + ]; + + $this->triggerEvents('extra_where'); + $this->db->table($this->tables['users'])->update($update, [$this->identityColumn => $identity]); + + if ($this->db->affectedRows() === 1) + { + $this->triggerEvents(['post_forgotten_password', 'post_forgotten_password_successful']); + return $token->userCode; + } + else + { + $this->triggerEvents(['post_forgotten_password', 'post_forgotten_password_unsuccessful']); + return false; + } + } + + /** + * Get a user from a forgotten password key. + * + * @param string $userCode Forgotten password key + * + * @return boolean|object + * @author Mathew + * @updated Ryan + */ + public function getUserByForgottenPasswordCode(string $userCode) + { + // Retrieve the token object from the code + $token = $this->retrieveSelectorValidatorCouple($userCode); + + // Retrieve the user according to this selector + $user = $this->where('forgotten_password_selector', $token->selector)->users()->row(); + + if ($user) + { + // Check the hash against the validator + if ($this->verifyPassword($token->validator, $user->forgotten_password_code)) + { + return $user; + } + } + + return false; + } + + /** + * Register (create) a new user + * + * @param string $identity This must be the value that uniquely identifies the user when he is registered + * @param string $password Password + * @param string $email Email + * @param array $additionalData Multidimensional array + * @param array $groups If not passed the default group name set in the config will be used + * + * @return integer|boolean + * @author Mathew + */ + public function register(string $identity, string $password, string $email, array $additionalData = [], array $groups = []) + { + $this->triggerEvents('pre_register'); + + $manualActivation = $this->config->manualActivation; + + if ($this->identityCheck($identity)) + { + $this->setError('IonAuth.account_creation_duplicate_identity'); + return false; + } + else if (! $this->config->defaultGroup && empty($groups)) + { + $this->setError('IonAuth.account_creation_missing_defaultGroup'); + return false; + } + + // check if the default set in config exists in database + $query = $this->db->table($this->tables['groups'])->where(['name' => $this->config->defaultGroup], 1)->get()->getRow(); + if (! isset($query->id) && empty($groups)) + { + $this->setError('IonAuth.account_creation_invalid_defaultGroup'); + return false; + } + + // capture default group details + $defaultGroup = $query; + + // IP Address + $ipAddress = \Config\Services::request()->getIPAddress(); + + // Do not pass $identity as user is not known yet so there is no need + $password = $this->hashPassword($password); + + if ($password === false) + { + $this->setError('IonAuth.account_creation_unsuccessful'); + return false; + } + + // Users table. + $data = [ + $this->identityColumn => $identity, + 'username' => $identity, + 'password' => $password, + 'email' => $email, + 'ip_address' => $ipAddress, + 'created_on' => time(), + 'active' => ($manualActivation === false ? 1 : 0), + ]; + + // filter out any data passed that doesnt have a matching column in the users table + // and merge the set user data and the additional data + $userData = array_merge($this->filterData($this->tables['users'], $additionalData), $data); + + $this->triggerEvents('extra_set'); + + $this->db->table($this->tables['users'])->insert($userData); + + $id = $this->db->insertId($this->tables['users'] . '_id_seq'); + + // add in groups array if it doesn't exists and stop adding into default group if default group ids are set + if (isset($defaultGroup->id) && empty($groups)) + { + $groups[] = $defaultGroup->id; + } + + if (! empty($groups)) + { + // add to groups + foreach ($groups as $group) + { + $this->addToGroup($group, $id); + } + } + + $this->triggerEvents('post_register'); + + return $id ?? false; + } + + /** + * Logs the user into the system + * + * @param string $identity Username, email or any unique value in your users table, depending on your configuration + * @param string $password Password + * @param boolean $remember Sets the user to be remembered if enabled in the configuration + * + * @return boolean + * @author Mathew + */ + public function login(string $identity, string $password, bool $remember = false): bool + { + $this->triggerEvents('pre_login'); + + if (empty($identity) || empty($password)) + { + $this->setError('IonAuth.login_unsuccessful'); + return false; + } + + $this->triggerEvents('extra_where'); + $query = $this->db->table($this->tables['users']) + ->select($this->identityColumn . ', email, id, password, active, last_login') + ->where($this->identityColumn, $identity) + ->limit(1) + ->orderBy('id', 'desc') + ->get(); + + if ($this->isMaxLoginAttemptsExceeded($identity)) + { + // Hash something anyway, just to take up time + $this->hashPassword($password); + + $this->triggerEvents('post_login_unsuccessful'); + $this->setError('IonAuth.login_timeout'); + + return false; + } + + $user = $query->getRow(); + + if (isset($user)) + { + if ($this->verifyPassword($password, $user->password, $identity)) + { + if ($user->active === 0) + { + $this->triggerEvents('post_login_unsuccessful'); + $this->setError('IonAuth.login_unsuccessful_not_active'); + + return false; + } + + $this->setSession($user); + + $this->updateLastLogin($user->id); + + $this->clearLoginAttempts($identity); + $this->clearForgottenPasswordCode($identity); + + if ($this->config->rememberUsers) + { + if ($remember) + { + $this->rememberUser($identity); + } + else + { + $this->clearRememberCode($identity); + } + } + + // Rehash if needed + $this->rehashPasswordIfNeeded($user->password, $identity, $password); + + // Regenerate the session (for security purpose: to avoid session fixation) + $this->session->regenerate(false); + + $this->triggerEvents(['post_login', 'post_login_successful']); + $this->setMessage('IonAuth.login_successful'); + + return true; + } + } + + // Hash something anyway, just to take up time + $this->hashPassword($password); + + $this->increaseLoginAttempts($identity); + + $this->triggerEvents('post_login_unsuccessful'); + $this->setError('IonAuth.login_unsuccessful'); + + return false; + } + + /** + * Verifies if the session should be rechecked according to the configuration item recheckTimer. If it does, then + * it will check if the user is still active + * + * @return boolean + */ + public function recheckSession(): bool + { + $recheck = (null !== $this->config->recheckTimer) ? $this->config->recheckTimer : 0; + + if ($recheck !== 0) + { + $lastLogin = $this->session->get('last_check'); + if ($lastLogin + $recheck < time()) + { + $query = $this->db->select('id') + ->where([ + $this->identityColumn => $this->session->get('identity'), + 'active' => '1', + ]) + ->limit(1) + ->orderBy('id', 'desc') + ->get($this->tables['users']); + if ($query->numRows() === 1) + { + $this->session->set_userdata('last_check', time()); + } + else + { + $this->triggerEvents('logout'); + + $identity = $this->config->identity; + + $this->session->unset_userdata([$identity, 'id', 'user_id']); + + return false; + } + } + } + + return (bool)session('identity'); + } + + /** + * Check if max login attempts exceeded + * Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth) + * + * @param string $identity User's identity + * @param string|null $ipAddress IP address + * Only used if trackLoginIpAddress is set to true. + * If null (default value), the current IP address is used. + * Use getLastAttemptIp($identity) to retrieve a user's last IP + * + * @return boolean + */ + public function isMaxLoginAttemptsExceeded(string $identity, $ipAddress = null): bool + { + if ($this->config->trackLoginAttempts) + { + $maxAttempts = $this->config->maximumLoginAttempts; + if ($maxAttempts > 0) + { + $attempts = $this->getAttemptsNum($identity, $ipAddress); + return $attempts >= $maxAttempts; + } + } + return false; + } + + /** + * Get number of login attempts for the given IP-address or identity + * Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth) + * + * @param string $identity User's identity + * @param string|null $ipAddress IP address + * Only used if trackLoginIpAddress is set to true. + * If null (default value), the current IP address is used. + * Use getLastAttemptIp($identity) to retrieve a user's last IP + * + * @return integer + */ + public function getAttemptsNum(string $identity, $ipAddress = null): int + { + if ($this->config->trackLoginAttempts) + { + $builder = $this->db->table($this->tables['login_attempts']); + $builder->where('login', $identity); + if ($this->config->trackLoginIpAddress) + { + if (! isset($ipAddress)) + { + $ipAddress = \Config\Services::request()->getIPAddress(); + } + $builder->where('ip_address', $ipAddress); + } + $builder->where('time >', time() - $this->config->lockoutTime, false); + return $builder->countAllResults(); + } + return 0; + } + + /** + * Get the last time a login attempt occurred from given identity + * + * @param string $identity User's identity + * @param string|null $ipAddress IP address + * Only used if trackLoginIpAddress is set to true. + * If null (default value), the current IP address is used. + * Use getLastAttemptIp($identity) to retrieve a user's last IP + * + * @return integer The time of the last login attempt for a given IP-address or identity + */ + public function getLastAttemptTime(string $identity, $ipAddress = null): int + { + if ($this->config->trackLoginAttempts) + { + $builder = $this->db->table($this->tables['login_attempts']); + $builder->select('time'); + $builder->where('login', $identity); + if ($this->config->trackLoginIpAddress) + { + if (! isset($ipAddress)) + { + $ipAddress = \Config\Services::request()->getIPAddress(); + } + $builder->where('ip_address', $ipAddress); + } + $builder->orderBy('id', 'desc'); + $qres = $builder->get(1); + + if ($qres->getRow()) + { + return $qres->getRow()->time; + } + } + + return 0; + } + + /** + * Get the IP address of the last time a login attempt occurred from given identity + * + * @param string $identity User's identity + * + * @return string + */ + public function getLastAttemptIp(string $identity) + { + if ($this->config->trackLoginAttempts && $this->config->trackLoginIpAddress) + { + $this->db->select('ip_address'); + $this->db->where('login', $identity); + $this->db->orderBy('id', 'desc'); + $qres = $this->db->get($this->tables['login_attempts'], 1); + + if ($qres->numRows() > 0) + { + return $qres->row()->ip_address; + } + } + + return ''; + } + + /** + * Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth) + * + * Note: the current IP address will be used if trackLoginIpAddress config value is true + * + * @param string $identity User's identity + * + * @return boolean + */ + public function increaseLoginAttempts(string $identity): bool + { + if ($this->config->trackLoginAttempts) + { + $data = ['ip_address' => '', 'login' => $identity, 'time' => time()]; + if ($this->config->trackLoginIpAddress) + { + $data['ip_address'] = \Config\Services::request()->getIPAddress(); + } + $builder = $this->db->table($this->tables['login_attempts']); + $builder->insert($data); + return true; + } + return false; + } + + /** + * Clear login attempts + * Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth) + * + * @param string $identity User's identity + * @param integer $oldAttemptsAxpirePeriod In seconds, any attempts older than this value will be removed. + * It is used for regularly purging the attempts table. + * (for security reason, minimum value is lockoutTime config value) + * @param string|null $ipAddress IP address + * Only used if track_login_ipAddress is set to true. + * If null (default value), the current IP address is used. + * Use getLastAttemptIp($identity) to retrieve a user's last IP + * + * @return boolean + */ + public function clearLoginAttempts(string $identity, int $oldAttemptsAxpirePeriod = 86400, $ipAddress = null): bool + { + if ($this->config->trackLoginAttempts) + { + // Make sure $oldAttemptsAxpirePeriod is at least equals to lockoutTime + $oldAttemptsAxpirePeriod = max($oldAttemptsAxpirePeriod, $this->config->lockoutTime); + + $builder = $this->db->table($this->tables['login_attempts']); + $builder->where('login', $identity); + if ($this->config->trackLoginIpAddress) + { + if (! isset($ipAddress)) + { + $ipAddress = \Config\Services::request()->getIPAddress(); + } + $builder->where('ip_address', $ipAddress); + } + // Purge obsolete login attempts + $builder->orWhere('time <', time() - $oldAttemptsAxpirePeriod, false); + + return $builder->delete() === false ? false: true; + } + return false; + } + + /** + * Limit + * + * @param integer $limit Limit + * + * @return static + */ + public function limit(int $limit): self + { + $this->triggerEvents('limit'); + $this->ionLimit = $limit; + + return $this; + } + + /** + * Offset + * + * @param integer $offset Offset + * + * @return static + */ + public function offset(int $offset): self + { + $this->triggerEvents('offset'); + $this->ionOffset = $offset; + + return $this; + } + + /** + * @param array|string $where + * @param null|string $value + * + * @return static + */ + public function where($where, $value = null): self + { + $this->triggerEvents('where'); + + if (! is_array($where)) + { + $where = [$where => $value]; + } + + array_push($this->ionWhere, $where); + + return $this; + } + + /** + * Like + * + * @param string $like + * @param string|null $value + * @param string $position + * + * @return static + */ + public function like(string $like, $value = null, $position = 'both'): self + { + $this->triggerEvents('like'); + + array_push($this->ionLike, [ + 'like' => $like, + 'value' => $value, + 'position' => $position, + ]); + + return $this; + } + + /** + * Select + * + * @param array|string $select Select + * + * @return static + */ + public function select($select): self + { + $this->triggerEvents('select'); + + $this->ionSelect[] = $select; + + return $this; + } + + /** + * Order by + * + * @param string $by By + * @param string $order Order + * + * @return static + */ + public function orderBy(string $by, string $order = 'desc'): self + { + $this->triggerEvents('order_by'); + + $this->ionOrderBy = $by; + $this->ionOrder = $order; + + return $this; + } + + /** + * Wrapper object to return a row as either an array, an object, or + * a custom class. + * + * If row doesn't exist, returns null. + * + * @return mixed + */ + public function row() + { + $this->triggerEvents('row'); + + $row = $this->response->getRow(); + + return $row; + } + + /** + * Returns a single row from the results as an array. + * + * If row doesn't exist, returns null. + * + * @return mixed + */ + public function rowArray() + { + $this->triggerEvents(['row', 'row_array']); + + $row = $this->response->getRowArray(); + + return $row; + } + + /** + * Get result + * + * @return array + */ + public function result(): array + { + $this->triggerEvents('result'); + + return $this->response->getResult(); + } + + /** + * Get result array + * + * @return array + */ + public function resultArray(): array + { + $this->triggerEvents(['result', 'result_array']); + + $result = $this->response->getResultArray(); + + return $result; + } + + /** + * Num rows + * + * @return integer + */ + public function numRows(): int + { + $this->triggerEvents(['num_rows']); + + $result = $this->response->numRows(); + + return $result; + } + + /** + * Get the users + * + * @param array|string|integer $groups Group IDs, group names, or group IDs and names + * + * @return static + * @author Ben Edmunds + */ + public function users($groups = null): self + { + $this->triggerEvents('users'); + + $builder = $this->db->table($this->tables['users']); + + if (! empty($this->ionSelect)) + { + foreach ($this->ionSelect as $select) + { + $builder->select($select); + } + + $this->ionSelect = []; + } + else + { + // default selects + $builder->select([ + $this->tables['users'] . '.*', + $this->tables['users'] . '.id as id', + $this->tables['users'] . '.id as user_id', + ]); + } + + // filter by group id(s) if passed + if (isset($groups)) + { + // build an array if only one group was passed + if (! is_array($groups)) + { + $groups = [$groups]; + } + + // join and then run a where_in against the group ids + if (! empty($groups)) + { + $builder->distinct(); + $builder->join( + $this->tables['users_groups'], + $this->tables['users_groups'] . '.' . $this->join['users'] . '=' . $this->tables['users'] . '.id', + 'inner' + ); + } + + // verify if group name or group id was used and create and put elements in different arrays + $groupIds = []; + $groupNames = []; + foreach ($groups as $group) + { + if (is_numeric($group)) + { + $groupIds[] = $group; + } + else + { + $groupNames[] = $group; + } + } + $orWhereIn = (! empty($groupIds) && ! empty($groupNames)) ? 'orWhereIn' : 'whereIn'; + // if group name was used we do one more join with groups + if (! empty($groupNames)) + { + $builder->join($this->tables['groups'], $this->tables['users_groups'] . '.' . $this->join['groups'] . ' = ' . $this->tables['groups'] . '.id', 'inner'); + $builder->whereIn($this->tables['groups'] . '.name', $groupNames); + } + if (! empty($groupIds)) + { + $builder->{$orWhereIn}($this->tables['users_groups'] . '.' . $this->join['groups'], $groupIds); + } + } + + $this->triggerEvents('extra_where'); + + // run each where that was passed + if (! empty($this->ionWhere)) + { + foreach ($this->ionWhere as $where) + { + $builder->where($where); + } + + $this->ionWhere = []; + } + + if (! empty($this->ionLike)) + { + foreach ($this->ionLike as $like) + { + $builder->orLike($like['like'], $like['value'], $like['position']); + } + + $this->ionLike = []; + } + + if (isset($this->ionLimit) && isset($this->ionOffset)) + { + $builder->limit($this->ionLimit, $this->ionOffset); + + $this->ionLimit = null; + $this->ionOffset = null; + } + else if (isset($this->ionLimit)) + { + $builder->limit($this->ionLimit); + + $this->ionLimit = null; + } + + // set the order + if (isset($this->ionOrderBy) && isset($this->ionOrder)) + { + $builder->orderBy($this->ionOrderBy, $this->ionOrder); + + $this->ionOrder = null; + $this->ionOrderBy = null; + } + + $this->response = $builder->get(); + + return $this; + } + + /** + * Get a user + * + * @param integer $id If a user id is not passed the id of the currently logged in user will be used + * + * @return static + * @author Ben Edmunds + */ + public function user(int $id = 0): self + { + $this->triggerEvents('user'); + + // if no id was passed use the current users id + $id = $id ?: $this->session->get('user_id'); + + $this->limit(1); + $this->orderBy($this->tables['users'] . '.id', 'desc'); + $this->where($this->tables['users'] . '.id', $id); + + $this->users(); + + return $this; + } + + /** + * Get all groups a user is part of + * + * @param integer $id If a user id is not passed the id of the currently logged in user will be used + * + * @return \CodeIgniter\Database\ResultInterface + * @author Ben Edmunds + */ + public function getUsersGroups(int $id = 0) + { + $this->triggerEvents('get_users_group'); + + // if no id was passed use the current users id + $id || $id = $this->session->get('user_id'); + + $builder = $this->db->table($this->tables['users_groups']); + return $builder->select($this->tables['users_groups'] . '.' . $this->join['groups'] . ' as id, ' . $this->tables['groups'] . '.name, ' . $this->tables['groups'] . '.description') + ->where($this->tables['users_groups'] . '.' . $this->join['users'], $id) + ->join($this->tables['groups'], $this->tables['users_groups'] . '.' . $this->join['groups'] . '=' . $this->tables['groups'] . '.id') + ->get(); + } + + /** + * Check to see if a user is in a group(s) + * + * @param integer|array $checkGroup Group(s) to check + * @param integer $id User id + * @param boolean $checkAll Check if all groups is present, or any of the groups + * + * @return boolean Whether the/all user(s) with the given ID(s) is/are in the given group + * @author Phil Sturgeon + **/ + public function inGroup($checkGroup, int $id = 0, bool $checkAll = false): bool + { + $this->triggerEvents('in_group'); + + $id || $id = $this->session->get('user_id'); + + if (! is_array($checkGroup)) + { + $checkGroup = [$checkGroup]; + } + + if (isset($this->cacheUserInGroup[$id])) + { + $groupsArray = $this->cacheUserInGroup[$id]; + } + else + { + $usersGroups = $this->getUsersGroups($id)->getResult(); + $groupsArray = []; + foreach ($usersGroups as $group) + { + $groupsArray[$group->id] = $group->name; + } + $this->cacheUserInGroup[$id] = $groupsArray; + } + foreach ($checkGroup as $key => $value) + { + $groups = (is_numeric($value)) ? array_keys($groupsArray) : $groupsArray; + + /** + * if !all (default), in_array + * if all, !in_array + */ + if (in_array($value, $groups) xor $checkAll) + { + /** + * if !all (default), true + * if all, false + */ + return ! $checkAll; + } + } + + /** + * if !all (default), false + * if all, true + */ + return $checkAll; + } + + /** + * Add to group + * + * @param array|integer $groupIds Groups id + * @param integer $userId User id + * + * @return integer The number of groups added + * @author Ben Edmunds + */ + public function addToGroup($groupIds, int $userId = 0): int + { + $this->triggerEvents('add_to_group'); + + // if no id was passed use the current users id + $userId || $userId = $this->session->get('user_id'); + + if (! is_array($groupIds)) + { + $groupIds = [$groupIds]; + } + + $return = 0; + + // Then insert each into the database + foreach ($groupIds as $groupId) + { + // Cast to float to support bigint data type + if ($this->db->table($this->tables['users_groups'])->insert([ + $this->join['groups'] => (float)$groupId, + $this->join['users'] => (float)$userId ])) + { + if (isset($this->cacheGroups[$groupId])) + { + $groupName = $this->cacheGroups[$groupId]; + } + else + { + $group = $this->group($groupId)->result(); + $groupName = $group[0]->name; + $this->cacheGroups[$groupId] = $groupName; + } + $this->cacheUserInGroup[$userId][$groupId] = $groupName; + + // Return the number of groups added + $return++; + } + } + + return $return; + } + + /** + * Remove from group + * + * @param array|integer $groupIds Group id + * @param integer $userId User id + * + * @return boolean + * @author Ben Edmunds + */ + public function removeFromGroup($groupIds = 0, int $userId = 0): bool + { + $this->triggerEvents('remove_from_group'); + + // user id is required + if (! $userId) + { + return false; + } + + $builder = $this->db->table($this->tables['users_groups']); + + // if group id(s) are passed remove user from the group(s) + if (! empty($groupIds)) + { + if (! is_array($groupIds)) + { + $groupIds = [$groupIds]; + } + + foreach ($groupIds as $groupId) + { + $builder->delete([$this->join['groups'] => (int)$groupId, $this->join['users'] => $userId]); + if (isset($this->cacheUserInGroup[$userId]) && isset($this->cacheUserInGroup[$userId][$groupId])) + { + unset($this->cacheUserInGroup[$userId][$groupId]); + } + } + + $return = true; + } + // otherwise remove user from all groups + else + { + if ($return = $builder->delete([$this->join['users'] => $userId])) + { + $this->cacheUserInGroup[$userId] = []; + $return = true; + } + } + return $return; + } + + /** + * Get the groups + * + * @return static + * @author Ben Edmunds + */ + public function groups(): self + { + $this->triggerEvents('groups'); + + $builder = $this->db->table($this->tables['groups']); + + // run each where that was passed + if (isset($this->ionWhere) && ! empty($this->ionWhere)) + { + foreach ($this->ionWhere as $where) + { + $builder->where($where); + } + $this->ionWhere = []; + } + + if (isset($this->ionLimit) && isset($this->ionOffset)) + { + $builder->limit($this->ionLimit, $this->ionOffset); + + $this->ionLimit = null; + $this->ionOffset = null; + } + else if (isset($this->ionLimit)) + { + $builder->limit($this->ionLimit); + + $this->ionLimit = null; + } + + // set the order + if (isset($this->ionOrderBy) && isset($this->ionOrder)) + { + $builder->orderBy($this->ionOrderBy, $this->ionOrder); + } + + $this->response = $builder->get(); + + return $this; + } + + /** + * Get a group + * + * @param integer $id Group id + * + * @return static + * @author Ben Edmunds + */ + public function group(int $id = 0) + { + $this->triggerEvents('group'); + + if ($id) + { + $this->where($this->tables['groups'] . '.id', $id); + } + + $this->limit(1); + $this->orderBy('id', 'desc'); + + return $this->groups(); + } + + /** + * Update a user + * + * @param integer $id User id + * @param array $data Multidimensional array + * + * @return boolean + * @author Phil Sturgeon + */ + public function update(int $id, array $data): bool + { + $this->triggerEvents('pre_update_user'); + + $user = $this->user($id)->row(); + + $this->db->transBegin(); + + if (array_key_exists($this->identityColumn, $data) && $this->identityCheck($data[$this->identityColumn]) && $user->{$this->identityColumn} !== $data[$this->identityColumn]) + { + $this->db->transRollback(); + $this->setError('IonAuth.account_creation_duplicate_identity'); + + $this->triggerEvents(['post_update_user', 'post_update_user_unsuccessful']); + $this->setError('IonAuth.update_unsuccessful'); + + return false; + } + + // Filter the data passed + $data = $this->filterData($this->tables['users'], $data); + + if (array_key_exists($this->identityColumn, $data) || array_key_exists('password', $data) || array_key_exists('email', $data)) + { + if (array_key_exists('password', $data)) + { + if (! empty($data['password'])) + { + $data['password'] = $this->hashPassword($data['password'], $user->{$this->identityColumn}); + if ($data['password'] === false) + { + $this->db->transRollback(); + $this->triggerEvents(['post_update_user', 'post_update_user_unsuccessful']); + $this->setError('IonAuth.update_unsuccessful'); + + return false; + } + } + else + { + // unset password so it doesn't effect database entry if no password passed + unset($data['password']); + } + } + } + + $this->triggerEvents('extra_where'); + $this->db->table($this->tables['users'])->update($data, ['id' => $user->id]); + + if ($this->db->transStatus() === false) + { + $this->db->transRollback(); + + $this->triggerEvents(['post_update_user', 'post_update_user_unsuccessful']); + $this->setError('IonAuth.update_unsuccessful'); + return false; + } + + $this->db->transCommit(); + + $this->triggerEvents(['post_update_user', 'post_update_user_successful']); + $this->setMessage('IonAuth.update_successful'); + return true; + } + + /** + * Delete a user + * + * @param integer $id User id + * + * @return boolean + * @author Phil Sturgeon + */ + public function deleteUser(int $id): bool + { + $this->triggerEvents('pre_delete_user'); + + $this->db->transBegin(); + + // remove user from groups + $this->removeFromGroup(null, $id); + + // delete user from users table should be placed after remove from group + $this->db->delete($this->tables['users'], ['id' => $id]); + + if ($this->db->transStatus() === false) + { + $this->db->transRollback(); + $this->triggerEvents(['post_delete_user', 'post_delete_user_unsuccessful']); + $this->setError('IonAuth.delete_unsuccessful'); + return false; + } + + $this->db->transCommit(); + + $this->triggerEvents(['post_delete_user', 'post_delete_user_successful']); + $this->setMessage('delete_successful'); + return true; + } + + /** + * Update last login + * + * @param integer $id User id + * + * @return boolean + * @author Ben Edmunds + */ + public function updateLastLogin(int $id): bool + { + $this->triggerEvents('update_last_login'); + + $this->triggerEvents('extra_where'); + + $this->db->table($this->tables['users'])->update(['last_login' => time()], ['id' => $id]); + + return $this->db->affectedRows() === 1; + } + + /** + * Set lang + * + * @param string $lang Lang + * + * @return boolean + * @author Ben Edmunds + */ + public function setLang(string $lang = 'en'): bool + { + $this->triggerEvents('set_lang'); + + // if the userExpire is set to zero we'll set the expiration two years from now. + if ($this->config->userExpire === 0) + { + $expire = self::MAX_COOKIE_LIFETIME; + } + // otherwise use what is set + else + { + $expire = $this->config->userExpire; + } + + set_cookie([ + 'name' => 'lang_code', + 'value' => $lang, + 'expire' => $expire, + ]); + + return true; + } + + /** + * Set session + * + * @param \stdClass $user User + * + * @return boolean + * @author jrmadsen67 + */ + public function setSession(\stdClass $user): bool + { + $this->triggerEvents('pre_set_session'); + + $sessionData = [ + 'identity' => $user->{$this->identityColumn}, + $this->identityColumn => $user->{$this->identityColumn}, + 'email' => $user->email, + 'user_id' => $user->id, //everyone likes to overwrite id so we'll use user_id + 'old_last_login' => $user->last_login, + 'last_check' => time(), + ]; + + $this->session->set($sessionData); + + $this->triggerEvents('post_set_session'); + + return true; + } + + /** + * Set a user to be remembered + * + * Implemented as described in + * https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence + * + * @param string $identity Identity + * + * @return boolean + * @author Ben Edmunds + */ + public function rememberUser(string $identity): bool + { + $this->triggerEvents('pre_remember_user'); + + if (! $identity) + { + return false; + } + + // Generate random tokens + $token = $this->generateSelectorValidatorCouple(); + + if ($token->validatorHashed) + { + $this->db->table('users')->update(['remember_selector' => $token->selector, + 'remember_code' => $token->validatorHashed], + [$this->identityColumn => $identity]); + + if ($this->db->affectedRows() > -1) + { + // if the userExpire is set to zero we'll set the expiration two years from now. + if ( $this->config->userExpire === 0) + { + $expire = self::MAX_COOKIE_LIFETIME; + } + // otherwise use what is set + else + { + $expire = $this->config->userExpire; + } + + set_cookie([ + 'name' => $this->config->rememberCookieName, + 'value' => $token->userCode, + 'expire' => $expire + ]); + + $this->triggerEvents(['post_remember_user', 'remember_user_successful']); + return true; + } + } + + $this->triggerEvents(['post_remember_user', 'remember_user_unsuccessful']); + return false; + } + + /** + * Login automatically a user with the "Remember me" feature + * Implemented as described in + * https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence + * + * @return boolean + * @author Ben Edmunds + */ + public function loginRememberedUser(): bool + { + $this->triggerEvents('pre_login_remembered_user'); + + // Retrieve token from cookie + $rememberCookie = get_cookie($this->config->rememberCookieName); + $token = $this->retrieveSelectorValidatorCouple($rememberCookie); + + if ($token === false) + { + $this->triggerEvents(['post_login_remembered_user', 'post_login_remembered_user_unsuccessful']); + return false; + } + + // get the user with the selector + $this->triggerEvents('extra_where'); + $query = $this->db->table($this->tables['users']) + ->select($this->identityColumn . ', id, email, remember_code, last_login') + ->where('remember_selector', $token->selector) + ->where('active', 1) + ->limit(1) + ->get(); + + // Check that we got the user + if ($query->numRows() === 1) + { + // Retrieve the information + $user = $query->row(); + + // Check the code against the validator + $identity = $user->{$this->identityColumn}; + if ($this->verifyPassword($token->validator, $user->remember_code, $identity)) + { + $this->updateLastLogin($user->id); + + $this->setSession($user); + + $this->clearForgottenPasswordCode($identity); + + // extend the users cookies if the option is enabled + if ($this->config->userExtendonLogin) + { + $this->rememberUser($identity); + } + + // Regenerate the session (for security purpose: to avoid session fixation) + $this->session->sess_regenerate(false); + + $this->triggerEvents(['post_login_remembered_user', 'post_login_remembered_user_successful']); + return true; + } + } + delete_cookie($this->config->rememberCookieName); + + $this->triggerEvents(['post_login_remembered_user', 'post_login_remembered_user_unsuccessful']); + return false; + } + + /** + * Create a group + * + * @param string $groupName Group name + * @param string $groupDescription Group description + * @param array $additionalData Additional data + * + * @return integer|boolean The ID of the inserted group, or false on failure + * @author aditya menon + */ + public function createGroup(string $groupName = '', string $groupDescription = '', array $additionalData = []) + { + // bail if the group name was not passed + if (! $groupName) + { + $this->setError('IonAuth.groupName_required'); + return false; + } + + // bail if the group name already exists + $existingGroup = $this->db->table($this->tables['groups'])->where(['name' => $groupName])->countAllResults(); + if ($existingGroup !== 0) + { + $this->setError('IonAuth.group_already_exists'); + return false; + } + + $data = [ + 'name' => $groupName, + 'description' => $groupDescription, + ]; + + // filter out any data passed that doesnt have a matching column in the groups table + // and merge the set group data and the additional data + if (! empty($additionalData)) + { + $data = array_merge($this->filterData($this->tables['groups'], $additionalData), $data); + } + + $this->triggerEvents('extra_group_set'); + + // insert the new group + $this->db->table($this->tables['groups'])->insert($data); + $groupId = $this->db->insertId($this->tables['groups'] . '_id_seq'); + + // report success + $this->setMessage('IonAuth.group_creation_successful'); + // return the brand new group id + return $groupId; + } + + /** + * Update group + * + * @param integer $groupId Group id + * @param string $groupName Group name + * @param array $additionalData Additional datas + * + * @return boolean + * @author aditya menon + */ + public function updateGroup(int $groupId, string $groupName = '', array $additionalData = []): bool + { + if (! $groupId) + { + return false; + } + + $data = []; + + if (! empty($groupName)) + { + // we are changing the name, so do some checks + + // bail if the group name already exists + $existingGroup = $this->db->table($this->tables['groups'])->getWhere(['name' => $groupName])->getRow(); + if (isset($existingGroup->id) && $existingGroup->id !== $groupId) + { + $this->setError('IonAuth.group_already_exists'); + return false; + } + + $data['name'] = $groupName; + } + + // restrict change of name of the admin group + $group = $this->db->table($this->tables['groups'])->getWhere(['id' => $groupId])->getRow(); + if ($this->config->adminGroup === $group->name && $groupName !== $group->name) + { + $this->setError('IonAuth.groupName_admin_not_alter'); + return false; + } + + // filter out any data passed that doesnt have a matching column in the groups table + // and merge the set group data and the additional data + if (! empty($additionalData)) + { + $data = array_merge($this->filterData($this->tables['groups'], $additionalData), $data); + } + + $this->db->table($this->tables['groups'])->update($data, ['id' => $groupId]); + + $this->setMessage('IonAuth.group_update_successful'); + + return true; + } + + /** + * Remove a group. + * + * @param integer $groupId Group id + * + * @return boolean + * @author aditya menon + */ + public function deleteGroup(int $groupId): bool + { + // bail if mandatory param not set + if (! $groupId || empty($groupId)) + { + return false; + } + $group = $this->group($groupId)->row(); + if ($group->name === $this->config->adminGroup) + { + $this->triggerEvents(['post_delete_group', 'post_delete_group_notallowed']); + $this->setError('IonAuth.group_delete_notallowed'); + return false; + } + + $this->triggerEvents('pre_delete_group'); + + $this->db->transBegin(); + + // remove all users from this group + $this->db->table($this->tables['users_groups'])->delete([$this->join['groups'] => $groupId]); + // remove the group itself + $this->db->table($this->tables['groups'])->delete(['id' => $groupId]); + + if ($this->db->transStatus() === false) + { + $this->db->transRollback(); + $this->triggerEvents(['post_delete_group', 'post_delete_group_unsuccessful']); + $this->setError('IonAuth.group_delete_unsuccessful'); + return false; + } + + $this->db->transCommit(); + + $this->triggerEvents(['post_delete_group', 'post_delete_group_successful']); + $this->setMessage('group_delete_successful'); + return true; + } + + /** + * Set a single or multiple functions to be called when trigged by triggerEvents(). + * + * @param string $event Event + * @param string $name Name + * @param string $class Class + * @param string $method Method + * @param array $arguments Arguments + * + * @return self + */ + public function setHook(string $event, string $name, string $class, string $method, array $arguments): self + { + $this->ionHooks->{$event}[$name] = new stdClass; + $this->ionHooks->{$event}[$name]->class = $class; + $this->ionHooks->{$event}[$name]->method = $method; + $this->ionHooks->{$event}[$name]->arguments = $arguments; + return $this; + } + + /** + * Remove hook + * + * @param string $event Event + * @param string $name Name + * + * @return void + */ + public function removeHook(string $event, string $name): void + { + if (isset($this->ionHooks->{$event}[$name])) + { + unset($this->ionHooks->{$event}[$name]); + } + } + + /** + * Remove hooks + * + * @param string $event Event + * + * @return void + */ + public function removeHooks(string $event): void + { + if (isset($this->ionHooks->$event)) + { + unset($this->ionHooks->$event); + } + } + + /** + * Call hook + * + * @param string $event Event + * @param string $name Name + * + * @return false|mixed + */ + protected function callHook(string $event, string $name) + { + if (isset($this->ionHooks->{$event}[$name]) && method_exists($this->ionHooks->{$event}[$name]->class, $this->ionHooks->{$event}[$name]->method)) + { + $hook = $this->ionHooks->{$event}[$name]; + + return call_user_func_array([$hook->class, $hook->method], $hook->arguments); + } + + return false; + } + + /** + * Call Additional functions to run that were registered with setHook(). + * + * @param string|array $events Event(s) + * + * @return void + */ + public function triggerEvents($events): void + { + if (is_array($events) && ! empty($events)) + { + foreach ($events as $event) + { + $this->triggerEvents($event); + } + } + else + { + if (isset($this->ionHooks->$events) && ! empty($this->ionHooks->$events)) + { + foreach ($this->ionHooks->$events as $name => $hook) + { + $this->callHook($events, $name); + } + } + } + } + + /** + * Set the message templates + * + * @param string $single Template for single message + * @param string $list Template for list messages + * + * @return true + * @author Ben Edmunds + */ + public function setMessageTemplate(string $single = '', string $list = ''): bool + { + if (! empty($single)) + { + $this->messagesTemplates['single'] = $single; + } + + if (! empty($list)) + { + $this->messagesTemplates['list'] = $list; + } + + return true; + } + + /** + * Set a message + * + * @param string $message The message + * + * @return string The given message + * @author Ben Edmunds + */ + public function setMessage(string $message): string + { + $this->messages[] = $message; + + return $message; + } + + /** + * Get the messages + * + * @return string + * @author Ben Edmunds + */ + public function messages(): string + { + if (empty($this->messages)) + { + return ''; + } + + $messageLang = []; + foreach ($this->messages as $message) + { + $messageLang[] = lang($message) !== $message ? lang($message) : '##' . $message . '##'; + } + return view($this->messagesTemplates['list'], ['messages' => $messageLang]); + } + + /** + * Get the messages as an array + * + * @param boolean $langify Translate messages ? + * + * @return array + * @author Raul Baldner Junior + */ + public function messagesArray(bool $langify = true): array + { + if ($langify) + { + $output = []; + foreach ($this->messages as $message) + { + $messageLang = lang($message) !== $message ? lang($message) : '##' . $message . '##'; + $output[] = view($this->messagesTemplates['signle'], ['message' => $messageLang]); + } + return $output; + } + else + { + return $this->messages; + } + } + + /** + * Clear messages + * + * @return true + * @author Ben Edmunds + */ + public function clearMessages() + { + $this->messages = []; + + return true; + } + + /** + * Set an error message + * + * @param string $error The error to set + * + * @return string The given error + * @author Ben Edmunds + */ + public function setError(string $error): string + { + $this->errors[] = $error; + + return $error; + } + + /** + * Get the error message + * + * @param string $template Template @see https://bcit-ci.github.io/CodeIgniter4/libraries/validation.html#configuration + * + * @return string + * @author Ben Edmunds + */ + public function errors(string $template = 'list'): string + { + if (! array_key_exists($template, config('Validation')->templates)) + { + throw new \CodeIgniter\Exceptions\ConfigException(lang('Validation.invalidTemplate', [$template])); + } + + $errors = []; + foreach ($this->errors as $error) + { + $errors[] = lang($error) !== $error ? lang($error) : '##' . $error . '##'; + } + + return view(config('Validation')->templates[$template], ['errors' => $errors]); + } + + /** + * Get the error messages as an array + * + * @param boolean $langify Langify errors ? + * + * @return array + * @author Raul Baldner Junior + * + * @deprecated No longer used by internal code and not recommended. + */ + public function errorsArray(bool $langify = true): array + { + if ($langify) + { + $output = []; + foreach ($this->errors as $error) + { + $output[] = lang($error) !== $error ? lang($error) : '##' . $error . '##'; + } + return $output; + } + else + { + return $this->errors; + } + } + + /** + * Get the error messages as an array + * + * @param boolean $langify Langify errors ? + * + * @return array + * @author Benoit VRIGNAUD + */ + public function getErrors(bool $langify = true): array + { + if ($langify) + { + $output = []; + foreach ($this->errors as $error) + { + $output[] = lang($error); + } + return $output; + } + else + { + return $this->errors; + } + } + + /** + * Clear Errors + * + * @return true + * @author Ben Edmunds + */ + public function clearErrors(): boolean + { + $this->errors = []; + + return true; + } + + /** + * Internal function to set a password in the database + * + * @param string $identity Identity + * @param string $password Password + * + * @return boolean + */ + protected function setPasswordDb(string $identity, string $password): bool + { + $hash = $this->hashPassword($password, $identity); + + if ($hash === false) + { + return false; + } + + // When setting a new password, invalidate any other token + $data = [ + 'password' => $hash, + 'remember_code' => null, + 'forgotten_password_code' => null, + 'forgotten_password_time' => null, + ]; + + $this->triggerEvents('extra_where'); + + $this->db->table($this->tables['users'])->update($data, [$this->identityColumn => $identity]); + + return $this->db->affectedRows() === 1; + } + + /** + * Filter data + * + * @param string $table Table + * @param array $data Data + * + * @return array + */ + protected function filterData(string $table, $data): array + { + $filteredData = []; + $columns = $this->db->getFieldNames($table); + + if (is_array($data)) + { + foreach ($columns as $column) + { + if (array_key_exists($column, $data)) + { + $filteredData[$column] = $data[$column]; + } + } + } + + return $filteredData; + } + + /** + * Generate a random token + * Inspired from http://php.net/manual/en/function.random-bytes.php#118932 + * + * @param integer $resultLength Result lenght + * + * @return string + */ + protected function randomToken(int $resultLength = 32): string + { + if ($resultLength <= 8) + { + $resultLength = 32; + } + + // Try random_bytes: PHP 7 + if (function_exists('random_bytes')) + { + return bin2hex(random_bytes($resultLength / 2)); + } + + // No luck! + throw new \Exception('Unable to generate a random token'); + } + + /** + * Retrieve hash parameter according to options + * + * @param string $identity Identity + * + * @return array|boolean + */ + protected function getHashParameters(string $identity = '') + { + // Check if user is administrator or not + $isAdmin = false; + if ($identity) + { + $userId = $this->getUserIdFromIdentity($identity); + if ($userId && $this->inGroup($this->config->adminGroup, $userId)) + { + $isAdmin = true; + } + } + + $params = false; + switch ($this->hashMethod) + { + case 'bcrypt': + $params = [ + 'cost' => $isAdmin ? $this->config->bcryptAdminCost + : $this->config->bcryptDefaultCost + ]; + break; + + case 'argon2': + $params = $isAdmin ? $this->config->argon2AdminParams + : $this->config->argon2DefaultParams; + break; + + default: + // Do nothing + } + + return $params; + } + + /** + * Retrieve hash algorithm according to options + * + * @return string|boolean + */ + protected function getHashAlgo() + { + $algo = false; + switch ($this->hashMethod) + { + case 'bcrypt': + $algo = PASSWORD_BCRYPT; + break; + + case 'argon2': + $algo = PASSWORD_ARGON2I; + break; + + default: + // Do nothing + } + + return $algo; + } + + /** + * Generate a random selector/validator couple + * This is a user code + * + * @param integer $selectorSize Size of the selector token + * @param integer $validatorSize Size of the validator token + * + * @return \stdClass + * ->selector simple token to retrieve the user (to store in DB) + * ->validatorHashed token (hashed) to validate the user (to store in DB) + * ->user_code code to be used user-side (in cookie or URL) + */ + protected function generateSelectorValidatorCouple(int $selectorSize = 40, int $validatorSize = 128): \stdClass + { + // The selector is a simple token to retrieve the user + $selector = $this->randomToken($selectorSize); + + // The validator will strictly validate the user and should be more complex + $validator = $this->randomToken($validatorSize); + + // The validator is hashed for storing in DB (avoid session stealing in case of DB leaked) + $validatorHashed = $this->hashPassword($validator); + + // The code to be used user-side + $userCode = $selector . '.' . $validator; + + return (object) [ + 'selector' => $selector, + 'validatorHashed' => $validatorHashed, + 'userCode' => $userCode, + ]; + } + + /** + * Retrieve remember cookie info + * + * @param string $userCode A user code of the form "selector.validator" + * + * @return false|stdCalss + * ->selector simple token to retrieve the user in DB + * ->validator token to validate the user (check against hashed value in DB) + */ + protected function retrieveSelectorValidatorCouple(string $userCode) + { + // Check code + if ($userCode) + { + $tokens = explode('.', $userCode); + + // Check tokens + if (count($tokens) === 2) + { + return (object) [ + 'selector' => $tokens[0], + 'validator' => $tokens[1], + ]; + } + } + + return false; + } + +} diff --git a/README.md b/README.md index c912b7cfd..11bdec715 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Ion Auth 3 +# Ion Auth 4 ### The future of authentication by [Ben Edmunds](http://benedmunds.com) @@ -17,9 +17,7 @@ If you use this to further your career, or put money in your pocket, and would l ## Server requirements -Ion Auth 3 needs **CodeIgniter 3** and **PHP 5.6**. -It should work on 5.4 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues. -In this case, you may need [password_compat](https://github.com/ircmaxell/password_compat). +Ion Auth 4 needs **CodeIgniter 4** and **PHP 7.1**. ## Documentation Documentation is located at http://benedmunds.com/ion_auth/ diff --git a/UPGRADING.md b/UPGRADING.md index 15745966f..f7bc5a55f 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -30,13 +30,13 @@ This is a bit more complex, depending on your configuration. The config file has changed: - For the **Hash Method** part: - - `hash_method` now only accepts `bcrypt` or the newer `argon2` (PHP 7.2) + - `hashMethod` now only accepts `bcrypt` or the newer `argon2` (PHP 7.2) (`sha1` is no longer supported for security considerations, see note below) - - `default_rounds` is modified to `bcrypt_default_cost` + - `default_rounds` is modified to `bcryptDefaultCost` - `random_rounds`, `min_rounds`, `max_rounds` and `salt_prefix` are removed as they don't serve any purpose anymore - - `argon2_default_params` is added for the Argon2 hash method - - `bcrypt_admin_cost` and `argon2_admin_params` are added to tweak the hash + - `argon2DefaultParams` is added for the Argon2 hash method + - `bcryptAdminCost` and `argon2AdminParams` are added to tweak the hash parameters for users in the admin group - For the **Authentication options** part: - `max_password_length` is removed as it is not good practice to limit password's length @@ -44,7 +44,7 @@ The config file has changed: - `random_identity_cookie_name` is removed as it doesn't serve any purpose anymore - The **Forgot Password Complete Email Template** part is completely removed because the feature doesn't exists anymore due to security issue. - - `email_forgot_password_complete` is removed + - `emailForgotPassword_complete` is removed - The **Salt options** part is completely removed due to the removing of the SHA1 hash method - `salt_length` and `store_salt` are removed diff --git a/Views/Messages/list.php b/Views/Messages/list.php new file mode 100644 index 000000000..c96db4415 --- /dev/null +++ b/Views/Messages/list.php @@ -0,0 +1,9 @@ + + + diff --git a/Views/Messages/single.php b/Views/Messages/single.php new file mode 100644 index 000000000..3ef27abcf --- /dev/null +++ b/Views/Messages/single.php @@ -0,0 +1 @@ +

diff --git a/Views/auth/change_password.php b/Views/auth/change_password.php new file mode 100644 index 000000000..fc67ca670 --- /dev/null +++ b/Views/auth/change_password.php @@ -0,0 +1,25 @@ +

+ +
+ + + +

+
+ +

+ +

+
+ +

+ +

+
+ +

+ + +

+ + diff --git a/Views/auth/create_group.php b/Views/auth/create_group.php new file mode 100644 index 000000000..eb35f58ca --- /dev/null +++ b/Views/auth/create_group.php @@ -0,0 +1,20 @@ +

+

+ +
+ + + +

+
+ +

+ +

+
+ +

+ +

+ + \ No newline at end of file diff --git a/Views/auth/create_user.php b/Views/auth/create_user.php new file mode 100644 index 000000000..b1659961a --- /dev/null +++ b/Views/auth/create_user.php @@ -0,0 +1,57 @@ +

+

+ +
+ + + +

+
+ +

+ +

+
+ +

+ + '; + echo form_label(lang('Auth.create_user_identity_label'), 'identity'); + echo '
'; + echo form_error('identity'); + echo form_input($identity); + echo '

'; + } + ?> + +

+
+ +

+ +

+
+ +

+ +

+
+ +

+ +

+
+ +

+ +

+
+ +

+ + +

+ + diff --git a/Views/auth/deactivate_user.php b/Views/auth/deactivate_user.php new file mode 100755 index 000000000..76b1396f7 --- /dev/null +++ b/Views/auth/deactivate_user.php @@ -0,0 +1,17 @@ +

+

username);?>

+ +id);?> + +

+ + + + +

+ + id); ?> + +

+ + diff --git a/Views/auth/edit_group.php b/Views/auth/edit_group.php new file mode 100644 index 000000000..471e925f2 --- /dev/null +++ b/Views/auth/edit_group.php @@ -0,0 +1,20 @@ +

+

+ +
+ + + +

+
+ +

+ +

+
+ +

+ +

+ + \ No newline at end of file diff --git a/views/auth/edit_user.php b/Views/auth/edit_user.php similarity index 51% rename from views/auth/edit_user.php rename to Views/auth/edit_user.php index 46e4190f4..95a667e2a 100644 --- a/views/auth/edit_user.php +++ b/Views/auth/edit_user.php @@ -1,66 +1,65 @@ -

-

+

+

-
+

-
+

-
+

-
+

-
+

-
+

- ion_auth->is_admin()): ?> + isAdmin()): ?> -

+

id);?> - -

+

diff --git a/Views/auth/email/activate.tpl.php b/Views/auth/email/activate.tpl.php new file mode 100644 index 000000000..ea2cf3e92 --- /dev/null +++ b/Views/auth/email/activate.tpl.php @@ -0,0 +1,11 @@ + + +

+

+ +

+ + \ No newline at end of file diff --git a/Views/auth/email/forgot_password.tpl.php b/Views/auth/email/forgot_password.tpl.php new file mode 100644 index 000000000..cac8f62cf --- /dev/null +++ b/Views/auth/email/forgot_password.tpl.php @@ -0,0 +1,8 @@ + + +

+

+ +

+ + diff --git a/Views/auth/forgot_password.php b/Views/auth/forgot_password.php new file mode 100644 index 000000000..1fbd8b82e --- /dev/null +++ b/Views/auth/forgot_password.php @@ -0,0 +1,15 @@ +

+

+ +
+ + + +

+
+ +

+ +

+ + diff --git a/Views/auth/index.php b/Views/auth/index.php new file mode 100755 index 000000000..e1dfe2716 --- /dev/null +++ b/Views/auth/index.php @@ -0,0 +1,31 @@ +

+

+ +
+ + + + + + + + + + + + + + + + + + + + +
first_name,ENT_QUOTES,'UTF-8');?>last_name,ENT_QUOTES,'UTF-8');?>email,ENT_QUOTES,'UTF-8');?> + groups as $group):?> + id, htmlspecialchars($group->name, ENT_QUOTES, 'UTF-8')); ?>
+ +
active) ? anchor('auth/deactivate/' . $user->id, lang('Auth.index_active_link')) : anchor("auth/activate/". $user->id, lang('Auth.index_inactive_link'));?>id, 'Edit') ;?>
+ +

|

diff --git a/Views/auth/login.php b/Views/auth/login.php new file mode 100644 index 000000000..a269aed58 --- /dev/null +++ b/Views/auth/login.php @@ -0,0 +1,28 @@ +

+

+ +
+ + + +

+ + +

+ +

+ + +

+ +

+ + +

+ + +

+ + + +

diff --git a/Views/auth/reset_password.php b/Views/auth/reset_password.php new file mode 100644 index 000000000..cf1cfddb9 --- /dev/null +++ b/Views/auth/reset_password.php @@ -0,0 +1,21 @@ +

+ +
+ + + +

+
+ +

+ +

+
+ +

+ + + +

+ + diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..6a890d0bf --- /dev/null +++ b/composer.json @@ -0,0 +1,32 @@ +{ + "name": "benedmunds/codeigniter-ion-auth", + "description": "Simple and Lightweight Auth System for CodeIgniter", + "type": "library", + "license": "MIT", + "homepage": "http://benedmunds.com/ion_auth", + "authors": [ + { + "name": "Ben EDMUNDS" + }, + { + "name": "Benoit VRIGNAUD", + "email": "benoit.vrignaud@zaclys.net" + } + ], + "require": { + "php": ">=7.1", + "codeigniter4/framework": "develop-dev" + }, + "require-dev": { + "phpunit/phpunit": "^7.3", + "codeigniter4/codeigniter4-standard": "^1.0", + "squizlabs/php_codesniffer": "^3.3" + }, + "autoload": { + "psr-4" : { + "IonAuth\\Controllers\\" : "Controllers/", + "IonAuth\\Libraries\\" : "Libraries/", + "IonAuth\\Models\\" : "Models/" + } + } +} diff --git a/config/ion_auth.php b/config/ion_auth.php deleted file mode 100644 index 22987fbff..000000000 --- a/config/ion_auth.php +++ /dev/null @@ -1,214 +0,0 @@ - 1 << 12, // 4MB - 'time_cost' => 2, - 'threads' => 2 -]; -$config['argon2_admin_params'] = [ - 'memory_cost' => 1 << 14, // 16MB - 'time_cost' => 4, - 'threads' => 2 -]; - -/* - | ------------------------------------------------------------------------- - | Authentication options. - | ------------------------------------------------------------------------- - | maximum_login_attempts: This maximum is not enforced by the library, but is used by - | is_max_login_attempts_exceeded(). - | The controller should check this function and act appropriately. - | If this variable set to 0, there is no maximum. - | min_password_length: This minimum is not enforced directly by the library. - | The controller should define a validation rule to enforce it. - | See the Auth controller for an example implementation. - | - | The library will fail for empty password or password size above 4096 bytes. - | This is an arbitrary (long) value to protect against DOS attack. - */ -$config['site_title'] = "Example.com"; // Site Title, example.com -$config['admin_email'] = "admin@example.com"; // Admin Email, admin@example.com -$config['default_group'] = 'members'; // Default group, use name -$config['admin_group'] = 'admin'; // Default administrators group, use name -$config['identity'] = 'email'; /* You can use any unique column in your table as identity column. - The values in this column, alongside password, will be used for login purposes - IMPORTANT: If you are changing it from the default (email), - update the UNIQUE constraint in your DB */ -$config['min_password_length'] = 8; // Minimum Required Length of Password (not enforced by lib - see note above) -$config['email_activation'] = FALSE; // Email Activation for registration -$config['manual_activation'] = FALSE; // Manual Activation for registration -$config['remember_users'] = TRUE; // Allow users to be remembered and enable auto-login -$config['user_expire'] = 86500; // How long to remember the user (seconds). Set to zero for no expiration -$config['user_extend_on_login'] = FALSE; // Extend the users cookies every time they auto-login -$config['track_login_attempts'] = TRUE; // Track the number of failed login attempts for each user or ip. -$config['track_login_ip_address'] = TRUE; // Track login attempts by IP Address, if FALSE will track based on identity. (Default: TRUE) -$config['maximum_login_attempts'] = 3; // The maximum number of failed login attempts. -$config['lockout_time'] = 600; /* The number of seconds to lockout an account due to exceeded attempts - You should not use a value below 60 (1 minute) */ -$config['forgot_password_expiration'] = 1800; /* The number of seconds after which a forgot password request will expire. If set to 0, forgot password requests will not expire. - 30 minutes to 1 hour are good values (enough for a user to receive the email and reset its password) - You should not set a value too high, as it would be a security issue! */ -$config['recheck_timer'] = 0; /* The number of seconds after which the session is checked again against database to see if the user still exists and is active. - Leave 0 if you don't want session recheck. if you really think you need to recheck the session against database, we would - recommend a higher value, as this would affect performance */ - -/* - | ------------------------------------------------------------------------- - | Cookie options. - | ------------------------------------------------------------------------- - | remember_cookie_name Default: remember_code - */ -$config['remember_cookie_name'] = 'remember_code'; - -/* - | ------------------------------------------------------------------------- - | Email options. - | ------------------------------------------------------------------------- - | email_config: - | 'file' = Use the default CI config or use from a config file - | array = Manually set your email config settings - */ -$config['use_ci_email'] = FALSE; // Send Email using the builtin CI email class, if false it will return the code and the identity -$config['email_config'] = [ - 'mailtype' => 'html', -]; - -/* - | ------------------------------------------------------------------------- - | Email templates. - | ------------------------------------------------------------------------- - | Folder where email templates are stored. - | Default: auth/ - */ -$config['email_templates'] = 'auth/email/'; - -/* - | ------------------------------------------------------------------------- - | Activate Account Email Template - | ------------------------------------------------------------------------- - | Default: activate.tpl.php - */ -$config['email_activate'] = 'activate.tpl.php'; - -/* - | ------------------------------------------------------------------------- - | Forgot Password Email Template - | ------------------------------------------------------------------------- - | Default: forgot_password.tpl.php - */ -$config['email_forgot_password'] = 'forgot_password.tpl.php'; - -/* - | ------------------------------------------------------------------------- - | Message Delimiters. - | ------------------------------------------------------------------------- - */ -$config['delimiters_source'] = 'config'; // "config" = use the settings defined here, "form_validation" = use the settings defined in CI's form validation library -$config['message_start_delimiter'] = '

'; // Message start delimiter -$config['message_end_delimiter'] = '

'; // Message end delimiter -$config['error_start_delimiter'] = '

'; // Error message start delimiter -$config['error_end_delimiter'] = '

'; // Error message end delimiter diff --git a/contributing.md b/contributing.md index 0f5c89912..589048697 100644 --- a/contributing.md +++ b/contributing.md @@ -11,7 +11,7 @@ The issue tracker is the preferred channel for bug reports, features requests an - Please do not derail or troll issues. Keep the discussion on topic and respect the opinions of others. ### Requirements -- Make sure your `PHP`Code is following the Codeigniter standards. +- Make sure your `PHP`Code is following the Codeigniter standards (https://github.com/bcit-ci/CodeIgniter4-Standard). - Add spacings between the php begin and end tag. - Comments should also have a space between `//` and the begin of the comment. like `// Example`. diff --git a/controllers/Auth.php b/controllers/Auth.php deleted file mode 100644 index 9036f27be..000000000 --- a/controllers/Auth.php +++ /dev/null @@ -1,881 +0,0 @@ -load->database(); - $this->load->library(['ion_auth', 'form_validation']); - $this->load->helper(['url', 'language']); - - $this->form_validation->set_error_delimiters($this->config->item('error_start_delimiter', 'ion_auth'), $this->config->item('error_end_delimiter', 'ion_auth')); - - $this->lang->load('auth'); - } - - /** - * Redirect if needed, otherwise display the user list - */ - public function index() - { - - if (!$this->ion_auth->logged_in()) - { - // redirect them to the login page - redirect('auth/login', 'refresh'); - } - else if (!$this->ion_auth->is_admin()) // remove this elseif if you want to enable this for non-admins - { - // redirect them to the home page because they must be an administrator to view this - show_error('You must be an administrator to view this page.'); - } - else - { - $this->data['title'] = $this->lang->line('index_heading'); - - // set the flash data error message if there is one - $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message'); - - //list the users - $this->data['users'] = $this->ion_auth->users()->result(); - foreach ($this->data['users'] as $k => $user) - { - $this->data['users'][$k]->groups = $this->ion_auth->get_users_groups($user->id)->result(); - } - - $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'index', $this->data); - } - } - - /** - * Log the user in - */ - public function login() - { - $this->data['title'] = $this->lang->line('login_heading'); - - // validate form input - $this->form_validation->set_rules('identity', str_replace(':', '', $this->lang->line('login_identity_label')), 'required'); - $this->form_validation->set_rules('password', str_replace(':', '', $this->lang->line('login_password_label')), 'required'); - - if ($this->form_validation->run() === TRUE) - { - // check to see if the user is logging in - // check for "remember me" - $remember = (bool)$this->input->post('remember'); - - if ($this->ion_auth->login($this->input->post('identity'), $this->input->post('password'), $remember)) - { - //if the login is successful - //redirect them back to the home page - $this->session->set_flashdata('message', $this->ion_auth->messages()); - redirect('/', 'refresh'); - } - else - { - // if the login was un-successful - // redirect them back to the login page - $this->session->set_flashdata('message', $this->ion_auth->errors()); - redirect('auth/login', 'refresh'); // use redirects instead of loading views for compatibility with MY_Controller libraries - } - } - else - { - // the user is not logging in so display the login page - // set the flash data error message if there is one - $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message'); - - $this->data['identity'] = [ - 'name' => 'identity', - 'id' => 'identity', - 'type' => 'text', - 'value' => $this->form_validation->set_value('identity'), - ]; - - $this->data['password'] = [ - 'name' => 'password', - 'id' => 'password', - 'type' => 'password', - ]; - - $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'login', $this->data); - } - } - - /** - * Log the user out - */ - public function logout() - { - $this->data['title'] = "Logout"; - - // log the user out - $this->ion_auth->logout(); - - // redirect them to the login page - $this->session->set_flashdata('message', $this->ion_auth->messages()); - redirect('auth/login', 'refresh'); - } - - /** - * Change password - */ - public function change_password() - { - $this->form_validation->set_rules('old', $this->lang->line('change_password_validation_old_password_label'), 'required'); - $this->form_validation->set_rules('new', $this->lang->line('change_password_validation_new_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|matches[new_confirm]'); - $this->form_validation->set_rules('new_confirm', $this->lang->line('change_password_validation_new_password_confirm_label'), 'required'); - - if (!$this->ion_auth->logged_in()) - { - redirect('auth/login', 'refresh'); - } - - $user = $this->ion_auth->user()->row(); - - if ($this->form_validation->run() === FALSE) - { - // display the form - // set the flash data error message if there is one - $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message'); - - $this->data['min_password_length'] = $this->config->item('min_password_length', 'ion_auth'); - $this->data['old_password'] = [ - 'name' => 'old', - 'id' => 'old', - 'type' => 'password', - ]; - $this->data['new_password'] = [ - 'name' => 'new', - 'id' => 'new', - 'type' => 'password', - 'pattern' => '^.{' . $this->data['min_password_length'] . '}.*$', - ]; - $this->data['new_password_confirm'] = [ - 'name' => 'new_confirm', - 'id' => 'new_confirm', - 'type' => 'password', - 'pattern' => '^.{' . $this->data['min_password_length'] . '}.*$', - ]; - $this->data['user_id'] = [ - 'name' => 'user_id', - 'id' => 'user_id', - 'type' => 'hidden', - 'value' => $user->id, - ]; - - // render - $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'change_password', $this->data); - } - else - { - $identity = $this->session->userdata('identity'); - - $change = $this->ion_auth->change_password($identity, $this->input->post('old'), $this->input->post('new')); - - if ($change) - { - //if the password was successfully changed - $this->session->set_flashdata('message', $this->ion_auth->messages()); - $this->logout(); - } - else - { - $this->session->set_flashdata('message', $this->ion_auth->errors()); - redirect('auth/change_password', 'refresh'); - } - } - } - - /** - * Forgot password - */ - public function forgot_password() - { - $this->data['title'] = $this->lang->line('forgot_password_heading'); - - // setting validation rules by checking whether identity is username or email - if ($this->config->item('identity', 'ion_auth') != 'email') - { - $this->form_validation->set_rules('identity', $this->lang->line('forgot_password_identity_label'), 'required'); - } - else - { - $this->form_validation->set_rules('identity', $this->lang->line('forgot_password_validation_email_label'), 'required|valid_email'); - } - - - if ($this->form_validation->run() === FALSE) - { - $this->data['type'] = $this->config->item('identity', 'ion_auth'); - // setup the input - $this->data['identity'] = [ - 'name' => 'identity', - 'id' => 'identity', - ]; - - if ($this->config->item('identity', 'ion_auth') != 'email') - { - $this->data['identity_label'] = $this->lang->line('forgot_password_identity_label'); - } - else - { - $this->data['identity_label'] = $this->lang->line('forgot_password_email_identity_label'); - } - - // set any errors and display the form - $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message'); - $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'forgot_password', $this->data); - } - else - { - $identity_column = $this->config->item('identity', 'ion_auth'); - $identity = $this->ion_auth->where($identity_column, $this->input->post('identity'))->users()->row(); - - if (empty($identity)) - { - - if ($this->config->item('identity', 'ion_auth') != 'email') - { - $this->ion_auth->set_error('forgot_password_identity_not_found'); - } - else - { - $this->ion_auth->set_error('forgot_password_email_not_found'); - } - - $this->session->set_flashdata('message', $this->ion_auth->errors()); - redirect("auth/forgot_password", 'refresh'); - } - - // run the forgotten password method to email an activation code to the user - $forgotten = $this->ion_auth->forgotten_password($identity->{$this->config->item('identity', 'ion_auth')}); - - if ($forgotten) - { - // if there were no errors - $this->session->set_flashdata('message', $this->ion_auth->messages()); - redirect("auth/login", 'refresh'); //we should display a confirmation page here instead of the login page - } - else - { - $this->session->set_flashdata('message', $this->ion_auth->errors()); - redirect("auth/forgot_password", 'refresh'); - } - } - } - - /** - * Reset password - final step for forgotten password - * - * @param string|null $code The reset code - */ - public function reset_password($code = NULL) - { - if (!$code) - { - show_404(); - } - - $this->data['title'] = $this->lang->line('reset_password_heading'); - - $user = $this->ion_auth->forgotten_password_check($code); - - if ($user) - { - // if the code is valid then display the password reset form - - $this->form_validation->set_rules('new', $this->lang->line('reset_password_validation_new_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|matches[new_confirm]'); - $this->form_validation->set_rules('new_confirm', $this->lang->line('reset_password_validation_new_password_confirm_label'), 'required'); - - if ($this->form_validation->run() === FALSE) - { - // display the form - - // set the flash data error message if there is one - $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message'); - - $this->data['min_password_length'] = $this->config->item('min_password_length', 'ion_auth'); - $this->data['new_password'] = [ - 'name' => 'new', - 'id' => 'new', - 'type' => 'password', - 'pattern' => '^.{' . $this->data['min_password_length'] . '}.*$', - ]; - $this->data['new_password_confirm'] = [ - 'name' => 'new_confirm', - 'id' => 'new_confirm', - 'type' => 'password', - 'pattern' => '^.{' . $this->data['min_password_length'] . '}.*$', - ]; - $this->data['user_id'] = [ - 'name' => 'user_id', - 'id' => 'user_id', - 'type' => 'hidden', - 'value' => $user->id, - ]; - $this->data['csrf'] = $this->_get_csrf_nonce(); - $this->data['code'] = $code; - - // render - $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'reset_password', $this->data); - } - else - { - $identity = $user->{$this->config->item('identity', 'ion_auth')}; - - // do we have a valid request? - if ($this->_valid_csrf_nonce() === FALSE || $user->id != $this->input->post('user_id')) - { - - // something fishy might be up - $this->ion_auth->clear_forgotten_password_code($identity); - - show_error($this->lang->line('error_csrf')); - - } - else - { - // finally change the password - $change = $this->ion_auth->reset_password($identity, $this->input->post('new')); - - if ($change) - { - // if the password was successfully changed - $this->session->set_flashdata('message', $this->ion_auth->messages()); - redirect("auth/login", 'refresh'); - } - else - { - $this->session->set_flashdata('message', $this->ion_auth->errors()); - redirect('auth/reset_password/' . $code, 'refresh'); - } - } - } - } - else - { - // if the code is invalid then send them back to the forgot password page - $this->session->set_flashdata('message', $this->ion_auth->errors()); - redirect("auth/forgot_password", 'refresh'); - } - } - - /** - * Activate the user - * - * @param int $id The user ID - * @param string|bool $code The activation code - */ - public function activate($id, $code = FALSE) - { - $activation = FALSE; - - if ($code !== FALSE) - { - $activation = $this->ion_auth->activate($id, $code); - } - else if ($this->ion_auth->is_admin()) - { - $activation = $this->ion_auth->activate($id); - } - - if ($activation) - { - // redirect them to the auth page - $this->session->set_flashdata('message', $this->ion_auth->messages()); - redirect("auth", 'refresh'); - } - else - { - // redirect them to the forgot password page - $this->session->set_flashdata('message', $this->ion_auth->errors()); - redirect("auth/forgot_password", 'refresh'); - } - } - - /** - * Deactivate the user - * - * @param int|string|null $id The user ID - */ - public function deactivate($id = NULL) - { - if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) - { - // redirect them to the home page because they must be an administrator to view this - show_error('You must be an administrator to view this page.'); - } - - $id = (int)$id; - - $this->load->library('form_validation'); - $this->form_validation->set_rules('confirm', $this->lang->line('deactivate_validation_confirm_label'), 'required'); - $this->form_validation->set_rules('id', $this->lang->line('deactivate_validation_user_id_label'), 'required|alpha_numeric'); - - if ($this->form_validation->run() === FALSE) - { - // insert csrf check - $this->data['csrf'] = $this->_get_csrf_nonce(); - $this->data['user'] = $this->ion_auth->user($id)->row(); - - $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'deactivate_user', $this->data); - } - else - { - // do we really want to deactivate? - if ($this->input->post('confirm') == 'yes') - { - // do we have a valid request? - if ($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post('id')) - { - show_error($this->lang->line('error_csrf')); - } - - // do we have the right userlevel? - if ($this->ion_auth->logged_in() && $this->ion_auth->is_admin()) - { - $this->ion_auth->deactivate($id); - } - } - - // redirect them back to the auth page - redirect('auth', 'refresh'); - } - } - - /** - * Create a new user - */ - public function create_user() - { - $this->data['title'] = $this->lang->line('create_user_heading'); - - if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) - { - redirect('auth', 'refresh'); - } - - $tables = $this->config->item('tables', 'ion_auth'); - $identity_column = $this->config->item('identity', 'ion_auth'); - $this->data['identity_column'] = $identity_column; - - // validate form input - $this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'trim|required'); - $this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'trim|required'); - if ($identity_column !== 'email') - { - $this->form_validation->set_rules('identity', $this->lang->line('create_user_validation_identity_label'), 'trim|required|is_unique[' . $tables['users'] . '.' . $identity_column . ']'); - $this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email'); - } - else - { - $this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email|is_unique[' . $tables['users'] . '.email]'); - } - $this->form_validation->set_rules('phone', $this->lang->line('create_user_validation_phone_label'), 'trim'); - $this->form_validation->set_rules('company', $this->lang->line('create_user_validation_company_label'), 'trim'); - $this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|matches[password_confirm]'); - $this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required'); - - if ($this->form_validation->run() === TRUE) - { - $email = strtolower($this->input->post('email')); - $identity = ($identity_column === 'email') ? $email : $this->input->post('identity'); - $password = $this->input->post('password'); - - $additional_data = [ - 'first_name' => $this->input->post('first_name'), - 'last_name' => $this->input->post('last_name'), - 'company' => $this->input->post('company'), - 'phone' => $this->input->post('phone'), - ]; - } - if ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data)) - { - // check to see if we are creating the user - // redirect them back to the admin page - $this->session->set_flashdata('message', $this->ion_auth->messages()); - redirect("auth", 'refresh'); - } - else - { - // display the create user form - // set the flash data error message if there is one - $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message'))); - - $this->data['first_name'] = [ - 'name' => 'first_name', - 'id' => 'first_name', - 'type' => 'text', - 'value' => $this->form_validation->set_value('first_name'), - ]; - $this->data['last_name'] = [ - 'name' => 'last_name', - 'id' => 'last_name', - 'type' => 'text', - 'value' => $this->form_validation->set_value('last_name'), - ]; - $this->data['identity'] = [ - 'name' => 'identity', - 'id' => 'identity', - 'type' => 'text', - 'value' => $this->form_validation->set_value('identity'), - ]; - $this->data['email'] = [ - 'name' => 'email', - 'id' => 'email', - 'type' => 'text', - 'value' => $this->form_validation->set_value('email'), - ]; - $this->data['company'] = [ - 'name' => 'company', - 'id' => 'company', - 'type' => 'text', - 'value' => $this->form_validation->set_value('company'), - ]; - $this->data['phone'] = [ - 'name' => 'phone', - 'id' => 'phone', - 'type' => 'text', - 'value' => $this->form_validation->set_value('phone'), - ]; - $this->data['password'] = [ - 'name' => 'password', - 'id' => 'password', - 'type' => 'password', - 'value' => $this->form_validation->set_value('password'), - ]; - $this->data['password_confirm'] = [ - 'name' => 'password_confirm', - 'id' => 'password_confirm', - 'type' => 'password', - 'value' => $this->form_validation->set_value('password_confirm'), - ]; - - $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'create_user', $this->data); - } - } - /** - * Redirect a user checking if is admin - */ - public function redirectUser(){ - if ($this->ion_auth->is_admin()){ - redirect('auth', 'refresh'); - } - redirect('/', 'refresh'); - } - - /** - * Edit a user - * - * @param int|string $id - */ - public function edit_user($id) - { - $this->data['title'] = $this->lang->line('edit_user_heading'); - - if (!$this->ion_auth->logged_in() || (!$this->ion_auth->is_admin() && !($this->ion_auth->user()->row()->id == $id))) - { - redirect('auth', 'refresh'); - } - - $user = $this->ion_auth->user($id)->row(); - $groups = $this->ion_auth->groups()->result_array(); - $currentGroups = $this->ion_auth->get_users_groups($id)->result(); - - // validate form input - $this->form_validation->set_rules('first_name', $this->lang->line('edit_user_validation_fname_label'), 'trim|required'); - $this->form_validation->set_rules('last_name', $this->lang->line('edit_user_validation_lname_label'), 'trim|required'); - $this->form_validation->set_rules('phone', $this->lang->line('edit_user_validation_phone_label'), 'trim|required'); - $this->form_validation->set_rules('company', $this->lang->line('edit_user_validation_company_label'), 'trim|required'); - - if (isset($_POST) && !empty($_POST)) - { - // do we have a valid request? - if ($this->_valid_csrf_nonce() === FALSE || $id != $this->input->post('id')) - { - show_error($this->lang->line('error_csrf')); - } - - // update the password if it was posted - if ($this->input->post('password')) - { - $this->form_validation->set_rules('password', $this->lang->line('edit_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|matches[password_confirm]'); - $this->form_validation->set_rules('password_confirm', $this->lang->line('edit_user_validation_password_confirm_label'), 'required'); - } - - if ($this->form_validation->run() === TRUE) - { - $data = [ - 'first_name' => $this->input->post('first_name'), - 'last_name' => $this->input->post('last_name'), - 'company' => $this->input->post('company'), - 'phone' => $this->input->post('phone'), - ]; - - // update the password if it was posted - if ($this->input->post('password')) - { - $data['password'] = $this->input->post('password'); - } - - // Only allow updating groups if user is admin - if ($this->ion_auth->is_admin()) - { - // Update the groups user belongs to - $groupData = $this->input->post('groups'); - - if (isset($groupData) && !empty($groupData)) - { - - $this->ion_auth->remove_from_group('', $id); - - foreach ($groupData as $grp) - { - $this->ion_auth->add_to_group($grp, $id); - } - - } - } - - // check to see if we are updating the user - if ($this->ion_auth->update($user->id, $data)) - { - // redirect them back to the admin page if admin, or to the base url if non admin - $this->session->set_flashdata('message', $this->ion_auth->messages()); - $this->redirectUser(); - - } - else - { - // redirect them back to the admin page if admin, or to the base url if non admin - $this->session->set_flashdata('message', $this->ion_auth->errors()); - $this->redirectUser(); - - } - - } - } - - // display the edit user form - $this->data['csrf'] = $this->_get_csrf_nonce(); - - // set the flash data error message if there is one - $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message'))); - - // pass the user to the view - $this->data['user'] = $user; - $this->data['groups'] = $groups; - $this->data['currentGroups'] = $currentGroups; - - $this->data['first_name'] = [ - 'name' => 'first_name', - 'id' => 'first_name', - 'type' => 'text', - 'value' => $this->form_validation->set_value('first_name', $user->first_name), - ]; - $this->data['last_name'] = [ - 'name' => 'last_name', - 'id' => 'last_name', - 'type' => 'text', - 'value' => $this->form_validation->set_value('last_name', $user->last_name), - ]; - $this->data['company'] = [ - 'name' => 'company', - 'id' => 'company', - 'type' => 'text', - 'value' => $this->form_validation->set_value('company', $user->company), - ]; - $this->data['phone'] = [ - 'name' => 'phone', - 'id' => 'phone', - 'type' => 'text', - 'value' => $this->form_validation->set_value('phone', $user->phone), - ]; - $this->data['password'] = [ - 'name' => 'password', - 'id' => 'password', - 'type' => 'password' - ]; - $this->data['password_confirm'] = [ - 'name' => 'password_confirm', - 'id' => 'password_confirm', - 'type' => 'password' - ]; - - $this->_render_page('auth/edit_user', $this->data); - } - - /** - * Create a new group - */ - public function create_group() - { - $this->data['title'] = $this->lang->line('create_group_title'); - - if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) - { - redirect('auth', 'refresh'); - } - - // validate form input - $this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'trim|required|alpha_dash'); - - if ($this->form_validation->run() === TRUE) - { - $new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description')); - if ($new_group_id) - { - // check to see if we are creating the group - // redirect them back to the admin page - $this->session->set_flashdata('message', $this->ion_auth->messages()); - redirect("auth", 'refresh'); - } - } - else - { - // display the create group form - // set the flash data error message if there is one - $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message'))); - - $this->data['group_name'] = [ - 'name' => 'group_name', - 'id' => 'group_name', - 'type' => 'text', - 'value' => $this->form_validation->set_value('group_name'), - ]; - $this->data['description'] = [ - 'name' => 'description', - 'id' => 'description', - 'type' => 'text', - 'value' => $this->form_validation->set_value('description'), - ]; - - $this->_render_page('auth/create_group', $this->data); - } - } - - /** - * Edit a group - * - * @param int|string $id - */ - public function edit_group($id) - { - // bail if no group id given - if (!$id || empty($id)) - { - redirect('auth', 'refresh'); - } - - $this->data['title'] = $this->lang->line('edit_group_title'); - - if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) - { - redirect('auth', 'refresh'); - } - - $group = $this->ion_auth->group($id)->row(); - - // validate form input - $this->form_validation->set_rules('group_name', $this->lang->line('edit_group_validation_name_label'), 'required|alpha_dash'); - - if (isset($_POST) && !empty($_POST)) - { - if ($this->form_validation->run() === TRUE) - { - $group_update = $this->ion_auth->update_group($id, $_POST['group_name'], $_POST['group_description']); - - if ($group_update) - { - $this->session->set_flashdata('message', $this->lang->line('edit_group_saved')); - } - else - { - $this->session->set_flashdata('message', $this->ion_auth->errors()); - } - redirect("auth", 'refresh'); - } - } - - // set the flash data error message if there is one - $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message'))); - - // pass the user to the view - $this->data['group'] = $group; - - $readonly = $this->config->item('admin_group', 'ion_auth') === $group->name ? 'readonly' : ''; - - $this->data['group_name'] = [ - 'name' => 'group_name', - 'id' => 'group_name', - 'type' => 'text', - 'value' => $this->form_validation->set_value('group_name', $group->name), - $readonly => $readonly, - ]; - $this->data['group_description'] = [ - 'name' => 'group_description', - 'id' => 'group_description', - 'type' => 'text', - 'value' => $this->form_validation->set_value('group_description', $group->description), - ]; - - $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'edit_group', $this->data); - } - - /** - * @return array A CSRF key-value pair - */ - public function _get_csrf_nonce() - { - $this->load->helper('string'); - $key = random_string('alnum', 8); - $value = random_string('alnum', 20); - $this->session->set_flashdata('csrfkey', $key); - $this->session->set_flashdata('csrfvalue', $value); - - return [$key => $value]; - } - - /** - * @return bool Whether the posted CSRF token matches - */ - public function _valid_csrf_nonce(){ - $csrfkey = $this->input->post($this->session->flashdata('csrfkey')); - if ($csrfkey && $csrfkey === $this->session->flashdata('csrfvalue')) - { - return TRUE; - } - return FALSE; - } - - /** - * @param string $view - * @param array|null $data - * @param bool $returnhtml - * - * @return mixed - */ - public function _render_page($view, $data = NULL, $returnhtml = FALSE)//I think this makes more sense - { - - $viewdata = (empty($data)) ? $this->data : $data; - - $view_html = $this->load->view($view, $viewdata, $returnhtml); - - // This will return html on 3rd argument being true - if ($returnhtml) - { - return $view_html; - } - } - -} diff --git a/language/arabic/auth_lang.php b/language/arabic/auth_lang.php deleted file mode 100644 index 95d9a0f9f..000000000 --- a/language/arabic/auth_lang.php +++ /dev/null @@ -1,157 +0,0 @@ - - * @link http://www.yorickpeterse.com/ - * - */ - -// Account Creation -$lang['account_creation_successful'] = 'Ahoy, Welcome Aboard Landlubber!'; -$lang['account_creation_unsuccessful'] = 'Avast, Unable to Commandeer Ship'; -$lang['account_creation_duplicate_email'] = 'Letter in the Bottle Already Used or Invalid'; -$lang['account_creation_duplicate_identity'] = 'Pirate Name Already Used or Invalid'; - -// TODO Please Translate -$lang['account_creation_missing_default_group'] = 'Default group is not set'; -$lang['account_creation_invalid_default_group'] = 'Invalid default group name set'; - - -// Password -$lang['password_change_successful'] = 'Secret Code Successfully Changed'; -$lang['password_change_unsuccessful'] = 'Unable to Change Secret Code'; -$lang['forgot_password_successful'] = 'Secret Code Reset Letter Sent'; -$lang['forgot_password_unsuccessful'] = 'Unable to Reset Secret Code'; - -// Activation -$lang['activate_successful'] = 'Ahoy, Your Ship Be Ready For Sailing The Seven Seas'; -$lang['activate_unsuccessful'] = 'Avast, Furner be having trouble!'; -$lang['deactivate_successful'] = 'Furner be burned down by the Navy'; -$lang['deactivate_unsuccessful'] = 'Shiver me timbers! Account not Deactivated'; -$lang['activation_email_successful'] = 'Letter in the Bottle Sent'; -$lang['activation_email_unsuccessful'] = 'Unable to Send Letter in the Bottle'; -$lang['deactivate_current_user_unsuccessful']= 'You cannot De-Activate your self.'; - -// Login / Logout -$lang['login_successful'] = 'Yarr, welcome aboard!'; -$lang['login_unsuccessful'] = 'In-Correct Secret Code'; -$lang['login_unsuccessful_not_active'] = 'Account is inactive'; -$lang['login_timeout'] = 'Temporarily Locked Out. Try again later.'; -$lang['logout_successful'] = 'Be Seeying ya Matey'; - -// Account Changes -$lang['update_successful'] = 'Ship Information Successfully Updated'; -$lang['update_unsuccessful'] = 'Unable to Update Ship Information'; -$lang['delete_successful'] = 'Pirate Sent to Davy Jones\' Locker'; -$lang['delete_unsuccessful'] = 'Avast, The Pirate be Still Alive'; - -// Groups -$lang['group_creation_successful'] = 'Group created Successfully'; -$lang['group_already_exists'] = 'Group name already taken'; -$lang['group_update_successful'] = 'Group details updated'; -$lang['group_delete_successful'] = 'Group deleted'; -$lang['group_delete_unsuccessful'] = 'Unable to delete group'; -$lang['group_delete_notallowed'] = 'Can\'t delete the administrators\' group'; -$lang['group_name_required'] = 'Group name is a required field'; -$lang['group_name_admin_not_alter'] = 'Admin group name can not be changed'; - -// Activation Email -$lang['email_activation_subject'] = 'Account Activation'; -$lang['email_activate_heading'] = 'Activate account for %s'; -$lang['email_activate_subheading'] = 'Please click this link to %s.'; -$lang['email_activate_link'] = 'Activate Your Account'; -// Forgot Password Email -$lang['email_forgotten_password_subject'] = 'Forgotten Password Verification'; -$lang['email_forgot_password_heading'] = 'Reset Password for %s'; -$lang['email_forgot_password_subheading'] = 'Please click this link to %s.'; -$lang['email_forgot_password_link'] = 'Reset Your Password'; diff --git a/language/polish/auth_lang.php b/language/polish/auth_lang.php deleted file mode 100644 index e86de900e..000000000 --- a/language/polish/auth_lang.php +++ /dev/null @@ -1,159 +0,0 @@ -check_compatibility(); - - $this->config->load('ion_auth', TRUE); - $this->load->library(['email']); - $this->lang->load('ion_auth'); - $this->load->helper(['cookie', 'language','url']); - - $this->load->library('session'); - - $this->load->model('ion_auth_model'); - - $this->_cache_user_in_group =& $this->ion_auth_model->_cache_user_in_group; - - $email_config = $this->config->item('email_config', 'ion_auth'); - - if ($this->config->item('use_ci_email', 'ion_auth') && isset($email_config) && is_array($email_config)) - { - $this->email->initialize($email_config); - } - - $this->ion_auth_model->trigger_events('library_constructor'); - } - - /** - * __call - * - * Acts as a simple way to call model methods without loads of stupid alias' - * - * @param string $method - * @param array $arguments - * - * @return mixed - * @throws Exception - */ - public function __call($method, $arguments) - { - if (!method_exists( $this->ion_auth_model, $method) ) - { - throw new Exception('Undefined method Ion_auth::' . $method . '() called'); - } - if($method == 'create_user') - { - return call_user_func_array([$this, 'register'], $arguments); - } - if($method=='update_user') - { - return call_user_func_array([$this, 'update'], $arguments); - } - return call_user_func_array( [$this->ion_auth_model, $method], $arguments); - } - - /** - * __get - * - * Enables the use of CI super-global without having to define an extra variable. - * - * I can't remember where I first saw this, so thank you if you are the original author. -Militis - * - * @param string $var - * - * @return mixed - */ - public function __get($var) - { - return get_instance()->$var; - } - - /** - * Forgotten password feature - * - * @param string $identity - * - * @return array|bool - * @author Mathew - */ - public function forgotten_password($identity) - { - // Retrieve user information - $user = $this->where($this->ion_auth_model->identity_column, $identity) - ->where('active', 1) - ->users()->row(); - - if ($user) - { - // Generate code - $code = $this->ion_auth_model->forgotten_password($identity); - - if ($code) - { - $data = [ - 'identity' => $identity, - 'forgotten_password_code' => $code - ]; - - if (!$this->config->item('use_ci_email', 'ion_auth')) - { - $this->set_message('forgot_password_successful'); - return $data; - } - else - { - $message = $this->load->view($this->config->item('email_templates', 'ion_auth') . $this->config->item('email_forgot_password', 'ion_auth'), $data, TRUE); - $this->email->clear(); - $this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth')); - $this->email->to($user->email); - $this->email->subject($this->config->item('site_title', 'ion_auth') . ' - ' . $this->lang->line('email_forgotten_password_subject')); - $this->email->message($message); - - if ($this->email->send()) - { - $this->set_message('forgot_password_successful'); - return TRUE; - } - } - } - } - - $this->set_error('forgot_password_unsuccessful'); - return FALSE; - } - - /** - * forgotten_password_check - * - * @param string $code - * - * @return object|bool - * @author Michael - */ - public function forgotten_password_check($code) - { - $user = $this->ion_auth_model->get_user_by_forgotten_password_code($code); - - if (!is_object($user)) - { - $this->set_error('password_change_unsuccessful'); - return FALSE; - } - else - { - if ($this->config->item('forgot_password_expiration', 'ion_auth') > 0) - { - //Make sure it isn't expired - $expiration = $this->config->item('forgot_password_expiration', 'ion_auth'); - if (time() - $user->forgotten_password_time > $expiration) - { - //it has expired - $identity = $user->{$this->config->item('identity', 'ion_auth')}; - $this->ion_auth_model->clear_forgotten_password_code($identity); - $this->set_error('password_change_unsuccessful'); - return FALSE; - } - } - return $user; - } - } - - /** - * register - * - * @param string $identity - * @param string $password - * @param string $email - * @param array $additional_data - * @param array $group_ids - * - * @return int|array|bool The new user's ID if e-mail activation is disabled or Ion-Auth e-mail activation was - * completed; or an array of activation details if CI e-mail validation is enabled; or FALSE - * if the operation failed. - * @author Mathew - */ - public function register($identity, $password, $email, $additional_data = [], $group_ids = []) - { - $this->ion_auth_model->trigger_events('pre_account_creation'); - - $email_activation = $this->config->item('email_activation', 'ion_auth'); - - $id = $this->ion_auth_model->register($identity, $password, $email, $additional_data, $group_ids); - - if (!$email_activation) - { - if ($id !== FALSE) - { - $this->set_message('account_creation_successful'); - $this->ion_auth_model->trigger_events(['post_account_creation', 'post_account_creation_successful']); - return $id; - } - else - { - $this->set_error('account_creation_unsuccessful'); - $this->ion_auth_model->trigger_events(['post_account_creation', 'post_account_creation_unsuccessful']); - return FALSE; - } - } - else - { - if (!$id) - { - $this->set_error('account_creation_unsuccessful'); - return FALSE; - } - - // deactivate so the user much follow the activation flow - $deactivate = $this->ion_auth_model->deactivate($id); - - // the deactivate method call adds a message, here we need to clear that - $this->ion_auth_model->clear_messages(); - - - if (!$deactivate) - { - $this->set_error('deactivate_unsuccessful'); - $this->ion_auth_model->trigger_events(['post_account_creation', 'post_account_creation_unsuccessful']); - return FALSE; - } - - $activation_code = $this->ion_auth_model->activation_code; - $identity = $this->config->item('identity', 'ion_auth'); - $user = $this->ion_auth_model->user($id)->row(); - - $data = [ - 'identity' => $user->{$identity}, - 'id' => $user->id, - 'email' => $email, - 'activation' => $activation_code, - ]; - if(!$this->config->item('use_ci_email', 'ion_auth')) - { - $this->ion_auth_model->trigger_events(['post_account_creation', 'post_account_creation_successful', 'activation_email_successful']); - $this->set_message('activation_email_successful'); - return $data; - } - else - { - $message = $this->load->view($this->config->item('email_templates', 'ion_auth').$this->config->item('email_activate', 'ion_auth'), $data, true); - - $this->email->clear(); - $this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth')); - $this->email->to($email); - $this->email->subject($this->config->item('site_title', 'ion_auth') . ' - ' . $this->lang->line('email_activation_subject')); - $this->email->message($message); - - if ($this->email->send() === TRUE) - { - $this->ion_auth_model->trigger_events(['post_account_creation', 'post_account_creation_successful', 'activation_email_successful']); - $this->set_message('activation_email_successful'); - return $id; - } - - } - - $this->ion_auth_model->trigger_events(['post_account_creation', 'post_account_creation_unsuccessful', 'activation_email_unsuccessful']); - $this->set_error('activation_email_unsuccessful'); - return FALSE; - } - } - - /** - * Logout - * - * @return true - * @author Mathew - **/ - public function logout() - { - $this->ion_auth_model->trigger_events('logout'); - - $identity = $this->config->item('identity', 'ion_auth'); - - $this->session->unset_userdata([$identity, 'id', 'user_id']); - - // delete the remember me cookies if they exist - delete_cookie($this->config->item('remember_cookie_name', 'ion_auth')); - - // Clear all codes - $this->ion_auth_model->clear_forgotten_password_code($identity); - $this->ion_auth_model->clear_remember_code($identity); - - // Destroy the session - $this->session->sess_destroy(); - - // Recreate the session - if (version_compare(PHP_VERSION, '7.0.0') >= 0) - { - session_start(); - } - $this->session->sess_regenerate(TRUE); - - $this->set_message('logout_successful'); - return TRUE; - } - - /** - * Auto logs-in the user if they are remembered - * @return bool Whether the user is logged in - * @author Mathew - **/ - public function logged_in() - { - $this->ion_auth_model->trigger_events('logged_in'); - - $recheck = $this->ion_auth_model->recheck_session(); - - // auto-login the user if they are remembered - if (!$recheck && get_cookie($this->config->item('remember_cookie_name', 'ion_auth'))) - { - $recheck = $this->ion_auth_model->login_remembered_user(); - } - - return $recheck; - } - - /** - * @return int|null The user's ID from the session user data or NULL if not found - * @author jrmadsen67 - **/ - public function get_user_id() - { - $user_id = $this->session->userdata('user_id'); - if (!empty($user_id)) - { - return $user_id; - } - return NULL; - } - - /** - * @param int|string|bool $id - * - * @return bool Whether the user is an administrator - * @author Ben Edmunds - */ - public function is_admin($id = FALSE) - { - $this->ion_auth_model->trigger_events('is_admin'); - - $admin_group = $this->config->item('admin_group', 'ion_auth'); - - return $this->ion_auth_model->in_group($admin_group, $id); - } - - /** - * Check the compatibility with the server - * - * Script will die in case of error - */ - protected function check_compatibility() - { - // PHP password_* function sanity check - if (!function_exists('password_hash') || !function_exists('password_verify')) - { - show_error("PHP function password_hash or password_verify not found. " . - "Are you using CI 2 and PHP < 5.5? " . - "Please upgrade to CI 3, or PHP >= 5.5 " . - "or use password_compat (https://github.com/ircmaxell/password_compat)."); - } - - // Sanity check for CI2 - if (substr(CI_VERSION, 0, 1) === '2') - { - show_error("Ion Auth 3 requires CodeIgniter 3. Update to CI 3 or downgrade to Ion Auth 2."); - } - - // Compatibility check for CSPRNG - // See functions used in Ion_auth_model::_random_token() - if (!function_exists('random_bytes') && !function_exists('mcrypt_create_iv') && !function_exists('openssl_random_pseudo_bytes')) - { - show_error("No CSPRNG functions to generate random enough token. " . - "Please update to PHP 7 or use random_compat (https://github.com/paragonie/random_compat)."); - } - } - -} diff --git a/models/Ion_auth_model.php b/models/Ion_auth_model.php deleted file mode 100644 index 867fb0fc1..000000000 --- a/models/Ion_auth_model.php +++ /dev/null @@ -1,2783 +0,0 @@ -config->load('ion_auth', TRUE); - $this->load->helper('cookie'); - $this->load->helper('date'); - $this->lang->load('ion_auth'); - - // initialize the database - $group_name = $this->config->item('database_group_name', 'ion_auth'); - if (empty($group_name)) - { - // By default, use CI's db that should be already loaded - $CI =& get_instance(); - $this->db = $CI->db; - } - else - { - // For specific group name, open a new specific connection - $this->db = $this->load->database($group_name, TRUE, TRUE); - } - - // initialize db tables data - $this->tables = $this->config->item('tables', 'ion_auth'); - - // initialize data - $this->identity_column = $this->config->item('identity', 'ion_auth'); - $this->join = $this->config->item('join', 'ion_auth'); - - // initialize hash method options (Bcrypt) - $this->hash_method = $this->config->item('hash_method', 'ion_auth'); - - // initialize messages and error - $this->messages = []; - $this->errors = []; - $delimiters_source = $this->config->item('delimiters_source', 'ion_auth'); - - // load the error delimeters either from the config file or use what's been supplied to form validation - if ($delimiters_source === 'form_validation') - { - // load in delimiters from form_validation - // to keep this simple we'll load the value using reflection since these properties are protected - $this->load->library('form_validation'); - $form_validation_class = new ReflectionClass("CI_Form_validation"); - - $error_prefix = $form_validation_class->getProperty("_error_prefix"); - $error_prefix->setAccessible(TRUE); - $this->error_start_delimiter = $error_prefix->getValue($this->form_validation); - $this->message_start_delimiter = $this->error_start_delimiter; - - $error_suffix = $form_validation_class->getProperty("_error_suffix"); - $error_suffix->setAccessible(TRUE); - $this->error_end_delimiter = $error_suffix->getValue($this->form_validation); - $this->message_end_delimiter = $this->error_end_delimiter; - } - else - { - // use delimiters from config - $this->message_start_delimiter = $this->config->item('message_start_delimiter', 'ion_auth'); - $this->message_end_delimiter = $this->config->item('message_end_delimiter', 'ion_auth'); - $this->error_start_delimiter = $this->config->item('error_start_delimiter', 'ion_auth'); - $this->error_end_delimiter = $this->config->item('error_end_delimiter', 'ion_auth'); - } - - // initialize our hooks object - $this->_ion_hooks = new stdClass; - - $this->trigger_events('model_constructor'); - } - - /** - * Getter to the DB connection used by Ion Auth - * May prove useful for debugging - * - * @return object - */ - public function db() - { - return $this->db; - } - - /** - * Hashes the password to be stored in the database. - * - * @param string $password - * @param string $identity - * - * @return false|string - * @author Mathew - */ - public function hash_password($password, $identity = NULL) - { - // Check for empty password, or password containing null char, or password above limit - // Null char may pose issue: http://php.net/manual/en/function.password-hash.php#118603 - // Long password may pose DOS issue (note: strlen gives size in bytes and not in multibyte symbol) - if (empty($password) || strpos($password, "\0") !== FALSE || - strlen($password) > self::MAX_PASSWORD_SIZE_BYTES) - { - return FALSE; - } - - $algo = $this->_get_hash_algo(); - $params = $this->_get_hash_parameters($identity); - - if ($algo !== FALSE && $params !== FALSE) - { - return password_hash($password, $algo, $params); - } - - return FALSE; - } - - /** - * This function takes a password and validates it - * against an entry in the users table. - * - * @param string $password - * @param string $hash_password_db - * @param string $identity optional @deprecated only for BC SHA1 - * - * @return bool - * @author Mathew - */ - public function verify_password($password, $hash_password_db, $identity = NULL) - { - // Check for empty id or password, or password containing null char, or password above limit - // Null char may pose issue: http://php.net/manual/en/function.password-hash.php#118603 - // Long password may pose DOS issue (note: strlen gives size in bytes and not in multibyte symbol) - if (empty($password) || empty($hash_password_db) || strpos($password, "\0") !== FALSE - || strlen($password) > self::MAX_PASSWORD_SIZE_BYTES) - { - return FALSE; - } - - // password_hash always starts with $ - if (strpos($hash_password_db, '$') === 0) - { - return password_verify($password, $hash_password_db); - } - else - { - // Handle legacy SHA1 @TODO to delete in later revision - return $this->_password_verify_sha1_legacy($identity, $password, $hash_password_db); - } - } - - /** - * Check if password needs to be rehashed - * If true, then rehash and update it in DB - * - * @param string $hash - * @param string $identity - * @param string $password - * - */ - public function rehash_password_if_needed($hash, $identity, $password) - { - $algo = $this->_get_hash_algo(); - $params = $this->_get_hash_parameters($identity); - - if ($algo !== FALSE && $params !== FALSE) - { - if (password_needs_rehash($hash, $algo, $params)) - { - if ($this->_set_password_db($identity, $password)) - { - $this->trigger_events(['rehash_password', 'rehash_password_successful']); - } - else - { - $this->trigger_events(['rehash_password', 'rehash_password_unsuccessful']); - } - } - } - } - - /** - * Validates and removes activation code. - * - * @param int|string $id - * @param bool $code if omitted, simply activate the user without check - * - * @return bool - * @author Mathew - */ - public function activate($id, $code = FALSE) - { - $this->trigger_events('pre_activate'); - - $token = $this->_retrieve_selector_validator_couple($code); - - if ($token !== FALSE) - { - // A token was provided, we need to check it - - $query = $this->db->select([$this->identity_column, 'activation_code']) - ->where('activation_selector', $token->selector) - ->where('id', $id) - ->limit(1) - ->get($this->tables['users']); - - if ($query->num_rows() === 1) - { - $user = $query->row(); - - if ($this->verify_password($token->validator, $user->activation_code)) - { - $data = [ - 'activation_selector' => NULL, - 'activation_code' => NULL, - 'active' => 1 - ]; - - $this->trigger_events('extra_where'); - $this->db->update($this->tables['users'], $data, ['id' => $id]); - return TRUE; - } - } - } - else - { - // A token was NOT provided, simply activate the user - - $data = [ - 'activation_selector' => NULL, - 'activation_code' => NULL, - 'active' => 1 - ]; - - $this->trigger_events('extra_where'); - $this->db->update($this->tables['users'], $data, ['id' => $id]); - - if ($this->db->affected_rows() === 1) - { - $this->trigger_events(['post_activate', 'post_activate_successful']); - $this->set_message('activate_successful'); - return TRUE; - } - } - - $this->trigger_events(['post_activate', 'post_activate_unsuccessful']); - $this->set_error('activate_unsuccessful'); - return FALSE; - } - - - /** - * Updates a users row with an activation code. - * - * @param int|string|null $id - * - * @return bool - * @author Mathew - */ - public function deactivate($id = NULL) - { - $this->trigger_events('deactivate'); - - if (!isset($id)) - { - $this->set_error('deactivate_unsuccessful'); - return FALSE; - } - else if ($this->ion_auth->logged_in() && $this->user()->row()->id == $id) - { - $this->set_error('deactivate_current_user_unsuccessful'); - return FALSE; - } - - $token = $this->_generate_selector_validator_couple(20, 40); - $this->activation_code = $token->user_code; - - $data = [ - 'activation_selector' => $token->selector, - 'activation_code' => $token->validator_hashed, - 'active' => 0 - ]; - - $this->trigger_events('extra_where'); - $this->db->update($this->tables['users'], $data, ['id' => $id]); - - $return = $this->db->affected_rows() == 1; - if ($return) - { - $this->set_message('deactivate_successful'); - } - else - { - $this->set_error('deactivate_unsuccessful'); - } - - return $return; - } - - /** - * Clear the forgotten password code for a user - * - * @param string $identity - * - * @return bool Success - */ - public function clear_forgotten_password_code($identity) { - - if (empty($identity)) - { - return FALSE; - } - - $data = [ - 'forgotten_password_selector' => NULL, - 'forgotten_password_code' => NULL, - 'forgotten_password_time' => NULL - ]; - - $this->db->update($this->tables['users'], $data, [$this->identity_column => $identity]); - - return TRUE; - } - - /** - * Clear the remember code for a user - * - * @param string $identity - * - * @return bool Success - */ - public function clear_remember_code($identity) { - - if (empty($identity)) - { - return FALSE; - } - - $data = [ - 'remember_selector' => NULL, - 'remember_code' => NULL - ]; - - $this->db->update($this->tables['users'], $data, [$this->identity_column => $identity]); - - return TRUE; - } - - /** - * Reset password - * - * @param string $identity - * @param string $new - * - * @return bool - * @author Mathew - */ - public function reset_password($identity, $new) { - $this->trigger_events('pre_change_password'); - - if (!$this->identity_check($identity)) { - $this->trigger_events(['post_change_password', 'post_change_password_unsuccessful']); - return FALSE; - } - - $return = $this->_set_password_db($identity, $new); - - if ($return) - { - $this->trigger_events(['post_change_password', 'post_change_password_successful']); - $this->set_message('password_change_successful'); - } - else - { - $this->trigger_events(['post_change_password', 'post_change_password_unsuccessful']); - $this->set_error('password_change_unsuccessful'); - } - - return $return; - } - - /** - * Change password - * - * @param string $identity - * @param string $old - * @param string $new - * - * @return bool - * @author Mathew - */ - public function change_password($identity, $old, $new) - { - $this->trigger_events('pre_change_password'); - - $this->trigger_events('extra_where'); - - $query = $this->db->select('id, password') - ->where($this->identity_column, $identity) - ->limit(1) - ->order_by('id', 'desc') - ->get($this->tables['users']); - - if ($query->num_rows() !== 1) - { - $this->trigger_events(['post_change_password', 'post_change_password_unsuccessful']); - $this->set_error('password_change_unsuccessful'); - return FALSE; - } - - $user = $query->row(); - - if ($this->verify_password($old, $user->password, $identity)) - { - $result = $this->_set_password_db($identity, $new); - - if ($result) - { - $this->trigger_events(['post_change_password', 'post_change_password_successful']); - $this->set_message('password_change_successful'); - } - else - { - $this->trigger_events(['post_change_password', 'post_change_password_unsuccessful']); - $this->set_error('password_change_unsuccessful'); - } - - return $result; - } - - $this->set_error('password_change_unsuccessful'); - return FALSE; - } - - /** - * Checks username - * - * @param string $username - * - * @return bool - * @author Mathew - */ - public function username_check($username = '') - { - $this->trigger_events('username_check'); - - if (empty($username)) - { - return FALSE; - } - - $this->trigger_events('extra_where'); - - return $this->db->where('username', $username) - ->limit(1) - ->count_all_results($this->tables['users']) > 0; - } - - /** - * Checks email - * - * @param string $email - * - * @return bool - * @author Mathew - */ - public function email_check($email = '') - { - $this->trigger_events('email_check'); - - if (empty($email)) - { - return FALSE; - } - - $this->trigger_events('extra_where'); - - return $this->db->where('email', $email) - ->limit(1) - ->count_all_results($this->tables['users']) > 0; - } - - /** - * Identity check - * - * @param $identity string - * - * @return bool - * @author Mathew - */ - public function identity_check($identity = '') - { - $this->trigger_events('identity_check'); - - if (empty($identity)) - { - return FALSE; - } - - return $this->db->where($this->identity_column, $identity) - ->limit(1) - ->count_all_results($this->tables['users']) > 0; - } - - /** - * Get user ID from identity - * - * @param $identity string - * - * @return bool|int - */ - public function get_user_id_from_identity($identity = '') - { - if (empty($identity)) - { - return FALSE; - } - - $query = $this->db->select('id') - ->where($this->identity_column, $identity) - ->limit(1) - ->get($this->tables['users']); - - if ($query->num_rows() !== 1) - { - return FALSE; - } - - $user = $query->row(); - - return $user->id; - } - - /** - * Insert a forgotten password key. - * - * @param string $identity - * - * @return bool|string - * @author Mathew - * @updated Ryan - */ - public function forgotten_password($identity) - { - if (empty($identity)) - { - $this->trigger_events(['post_forgotten_password', 'post_forgotten_password_unsuccessful']); - return FALSE; - } - - // Generate random token: smaller size because it will be in the URL - $token = $this->_generate_selector_validator_couple(20, 80); - - $update = [ - 'forgotten_password_selector' => $token->selector, - 'forgotten_password_code' => $token->validator_hashed, - 'forgotten_password_time' => time() - ]; - - $this->trigger_events('extra_where'); - $this->db->update($this->tables['users'], $update, [$this->identity_column => $identity]); - - if ($this->db->affected_rows() === 1) - { - $this->trigger_events(['post_forgotten_password', 'post_forgotten_password_successful']); - return $token->user_code; - } - else - { - $this->trigger_events(['post_forgotten_password', 'post_forgotten_password_unsuccessful']); - return FALSE; - } - } - - /** - * Get a user from a forgotten password key. - * - * @param string $user_code - * - * @return bool|object - * @author Mathew - * @updated Ryan - */ - public function get_user_by_forgotten_password_code($user_code) - { - // Retrieve the token object from the code - $token = $this->_retrieve_selector_validator_couple($user_code); - - // Retrieve the user according to this selector - $user = $this->where('forgotten_password_selector', $token->selector)->users()->row(); - - if ($user) - { - // Check the hash against the validator - if ($this->verify_password($token->validator, $user->forgotten_password_code)) - { - return $user; - } - } - - return FALSE; - } - - /** - * Register - * - * @param string $identity - * @param string $password - * @param string $email - * @param array $additional_data - * @param array $groups - * - * @return bool - * @author Mathew - */ - public function register($identity, $password, $email, $additional_data = [], $groups = []) - { - $this->trigger_events('pre_register'); - - $manual_activation = $this->config->item('manual_activation', 'ion_auth'); - - if ($this->identity_check($identity)) - { - $this->set_error('account_creation_duplicate_identity'); - return FALSE; - } - else if (!$this->config->item('default_group', 'ion_auth') && empty($groups)) - { - $this->set_error('account_creation_missing_default_group'); - return FALSE; - } - - // check if the default set in config exists in database - $query = $this->db->get_where($this->tables['groups'], ['name' => $this->config->item('default_group', 'ion_auth')], 1)->row(); - if (!isset($query->id) && empty($groups)) - { - $this->set_error('account_creation_invalid_default_group'); - return FALSE; - } - - // capture default group details - $default_group = $query; - - // IP Address - $ip_address = $this->input->ip_address(); - - // Do not pass $identity as user is not known yet so there is no need - $password = $this->hash_password($password); - - if ($password === FALSE) - { - $this->set_error('account_creation_unsuccessful'); - return FALSE; - } - - // Users table. - $data = [ - $this->identity_column => $identity, - 'username' => $identity, - 'password' => $password, - 'email' => $email, - 'ip_address' => $ip_address, - 'created_on' => time(), - 'active' => ($manual_activation === FALSE ? 1 : 0) - ]; - - // filter out any data passed that doesnt have a matching column in the users table - // and merge the set user data and the additional data - $user_data = array_merge($this->_filter_data($this->tables['users'], $additional_data), $data); - - $this->trigger_events('extra_set'); - - $this->db->insert($this->tables['users'], $user_data); - - $id = $this->db->insert_id($this->tables['users'] . '_id_seq'); - - // add in groups array if it doesn't exists and stop adding into default group if default group ids are set - if (isset($default_group->id) && empty($groups)) - { - $groups[] = $default_group->id; - } - - if (!empty($groups)) - { - // add to groups - foreach ($groups as $group) - { - $this->add_to_group($group, $id); - } - } - - $this->trigger_events('post_register'); - - return (isset($id)) ? $id : FALSE; - } - - /** - * login - * - * @param string $identity - * @param string $password - * @param bool $remember - * - * @return bool - * @author Mathew - */ - public function login($identity, $password, $remember=FALSE) - { - $this->trigger_events('pre_login'); - - if (empty($identity) || empty($password)) - { - $this->set_error('login_unsuccessful'); - return FALSE; - } - - $this->trigger_events('extra_where'); - - $query = $this->db->select($this->identity_column . ', email, id, password, active, last_login') - ->where($this->identity_column, $identity) - ->limit(1) - ->order_by('id', 'desc') - ->get($this->tables['users']); - - if ($this->is_max_login_attempts_exceeded($identity)) - { - // Hash something anyway, just to take up time - $this->hash_password($password); - - $this->trigger_events('post_login_unsuccessful'); - $this->set_error('login_timeout'); - - return FALSE; - } - - if ($query->num_rows() === 1) - { - $user = $query->row(); - - if ($this->verify_password($password, $user->password, $identity)) - { - if ($user->active == 0) - { - $this->trigger_events('post_login_unsuccessful'); - $this->set_error('login_unsuccessful_not_active'); - - return FALSE; - } - - $this->set_session($user); - - $this->update_last_login($user->id); - - $this->clear_login_attempts($identity); - $this->clear_forgotten_password_code($identity); - - if ($this->config->item('remember_users', 'ion_auth')) - { - if ($remember) - { - $this->remember_user($identity); - } - else - { - $this->clear_remember_code($identity); - } - } - - // Rehash if needed - $this->rehash_password_if_needed($user->password, $identity, $password); - - // Regenerate the session (for security purpose: to avoid session fixation) - $this->session->sess_regenerate(FALSE); - - $this->trigger_events(['post_login', 'post_login_successful']); - $this->set_message('login_successful'); - - return TRUE; - } - } - - // Hash something anyway, just to take up time - $this->hash_password($password); - - $this->increase_login_attempts($identity); - - $this->trigger_events('post_login_unsuccessful'); - $this->set_error('login_unsuccessful'); - - return FALSE; - } - - /** - * Verifies if the session should be rechecked according to the configuration item recheck_timer. If it does, then - * it will check if the user is still active - * @return bool - */ - public function recheck_session() - { - $recheck = (NULL !== $this->config->item('recheck_timer', 'ion_auth')) ? $this->config->item('recheck_timer', 'ion_auth') : 0; - - if ($recheck !== 0) - { - $last_login = $this->session->userdata('last_check'); - if ($last_login + $recheck < time()) - { - $query = $this->db->select('id') - ->where([ - $this->identity_column => $this->session->userdata('identity'), - 'active' => '1' - ]) - ->limit(1) - ->order_by('id', 'desc') - ->get($this->tables['users']); - if ($query->num_rows() === 1) - { - $this->session->set_userdata('last_check', time()); - } - else - { - $this->trigger_events('logout'); - - $identity = $this->config->item('identity', 'ion_auth'); - - $this->session->unset_userdata([$identity, 'id', 'user_id']); - - return FALSE; - } - } - } - - return (bool)$this->session->userdata('identity'); - } - - /** - * is_max_login_attempts_exceeded - * Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth) - * - * @param string $identity user's identity - * @param string|null $ip_address IP address - * Only used if track_login_ip_address is set to TRUE. - * If NULL (default value), the current IP address is used. - * Use get_last_attempt_ip($identity) to retrieve a user's last IP - * - * @return boolean - */ - public function is_max_login_attempts_exceeded($identity, $ip_address = NULL) - { - if ($this->config->item('track_login_attempts', 'ion_auth')) - { - $max_attempts = $this->config->item('maximum_login_attempts', 'ion_auth'); - if ($max_attempts > 0) - { - $attempts = $this->get_attempts_num($identity, $ip_address); - return $attempts >= $max_attempts; - } - } - return FALSE; - } - - /** - * Get number of login attempts for the given IP-address or identity - * Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth) - * - * @param string $identity User's identity - * @param string|null $ip_address IP address - * Only used if track_login_ip_address is set to TRUE. - * If NULL (default value), the current IP address is used. - * Use get_last_attempt_ip($identity) to retrieve a user's last IP - * - * @return int - */ - public function get_attempts_num($identity, $ip_address = NULL) - { - if ($this->config->item('track_login_attempts', 'ion_auth')) - { - $this->db->select('1', FALSE); - $this->db->where('login', $identity); - if ($this->config->item('track_login_ip_address', 'ion_auth')) - { - if (!isset($ip_address)) - { - $ip_address = $this->input->ip_address(); - } - $this->db->where('ip_address', $ip_address); - } - $this->db->where('time >', time() - $this->config->item('lockout_time', 'ion_auth'), FALSE); - $qres = $this->db->get($this->tables['login_attempts']); - return $qres->num_rows(); - } - return 0; - } - - /** - * Get the last time a login attempt occurred from given identity - * - * @param string $identity User's identity - * @param string|null $ip_address IP address - * Only used if track_login_ip_address is set to TRUE. - * If NULL (default value), the current IP address is used. - * Use get_last_attempt_ip($identity) to retrieve a user's last IP - * - * @return int The time of the last login attempt for a given IP-address or identity - */ - public function get_last_attempt_time($identity, $ip_address = NULL) - { - if ($this->config->item('track_login_attempts', 'ion_auth')) - { - $this->db->select('time'); - $this->db->where('login', $identity); - if ($this->config->item('track_login_ip_address', 'ion_auth')) - { - if (!isset($ip_address)) - { - $ip_address = $this->input->ip_address(); - } - $this->db->where('ip_address', $ip_address); - } - $this->db->order_by('id', 'desc'); - $qres = $this->db->get($this->tables['login_attempts'], 1); - - if ($qres->num_rows() > 0) - { - return $qres->row()->time; - } - } - - return 0; - } - - /** - * Get the IP address of the last time a login attempt occurred from given identity - * - * @param string $identity User's identity - * - * @return string - */ - public function get_last_attempt_ip($identity) - { - if ($this->config->item('track_login_attempts', 'ion_auth') && $this->config->item('track_login_ip_address', 'ion_auth')) - { - $this->db->select('ip_address'); - $this->db->where('login', $identity); - $this->db->order_by('id', 'desc'); - $qres = $this->db->get($this->tables['login_attempts'], 1); - - if ($qres->num_rows() > 0) - { - return $qres->row()->ip_address; - } - } - - return ''; - } - - /** - * Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth) - * - * Note: the current IP address will be used if track_login_ip_address config value is TRUE - * - * @param string $identity User's identity - * - * @return bool - */ - public function increase_login_attempts($identity) - { - if ($this->config->item('track_login_attempts', 'ion_auth')) - { - $data = ['ip_address' => '', 'login' => $identity, 'time' => time()]; - if ($this->config->item('track_login_ip_address', 'ion_auth')) - { - $data['ip_address'] = $this->input->ip_address(); - } - return $this->db->insert($this->tables['login_attempts'], $data); - } - return FALSE; - } - - /** - * clear_login_attempts - * Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth) - * - * @param string $identity User's identity - * @param int $old_attempts_expire_period In seconds, any attempts older than this value will be removed. - * It is used for regularly purging the attempts table. - * (for security reason, minimum value is lockout_time config value) - * @param string|null $ip_address IP address - * Only used if track_login_ip_address is set to TRUE. - * If NULL (default value), the current IP address is used. - * Use get_last_attempt_ip($identity) to retrieve a user's last IP - * - * @return bool - */ - public function clear_login_attempts($identity, $old_attempts_expire_period = 86400, $ip_address = NULL) - { - if ($this->config->item('track_login_attempts', 'ion_auth')) - { - // Make sure $old_attempts_expire_period is at least equals to lockout_time - $old_attempts_expire_period = max($old_attempts_expire_period, $this->config->item('lockout_time', 'ion_auth')); - - $this->db->where('login', $identity); - if ($this->config->item('track_login_ip_address', 'ion_auth')) - { - if (!isset($ip_address)) - { - $ip_address = $this->input->ip_address(); - } - $this->db->where('ip_address', $ip_address); - } - // Purge obsolete login attempts - $this->db->or_where('time <', time() - $old_attempts_expire_period, FALSE); - - return $this->db->delete($this->tables['login_attempts']); - } - return FALSE; - } - - /** - * @param int $limit - * - * @return static - */ - public function limit($limit) - { - $this->trigger_events('limit'); - $this->_ion_limit = $limit; - - return $this; - } - - /** - * @param int $offset - * - * @return static - */ - public function offset($offset) - { - $this->trigger_events('offset'); - $this->_ion_offset = $offset; - - return $this; - } - - /** - * @param array|string $where - * @param null|string $value - * - * @return static - */ - public function where($where, $value = NULL) - { - $this->trigger_events('where'); - - if (!is_array($where)) - { - $where = [$where => $value]; - } - - array_push($this->_ion_where, $where); - - return $this; - } - - /** - * @param string $like - * @param string|null $value - * @param string $position - * - * @return static - */ - public function like($like, $value = NULL, $position = 'both') - { - $this->trigger_events('like'); - - array_push($this->_ion_like, [ - 'like' => $like, - 'value' => $value, - 'position' => $position - ]); - - return $this; - } - - /** - * @param array|string $select - * - * @return static - */ - public function select($select) - { - $this->trigger_events('select'); - - $this->_ion_select[] = $select; - - return $this; - } - - /** - * @param string $by - * @param string $order - * - * @return static - */ - public function order_by($by, $order='desc') - { - $this->trigger_events('order_by'); - - $this->_ion_order_by = $by; - $this->_ion_order = $order; - - return $this; - } - - /** - * @return object|mixed - */ - public function row() - { - $this->trigger_events('row'); - - $row = $this->response->row(); - - return $row; - } - - /** - * @return array|mixed - */ - public function row_array() - { - $this->trigger_events(['row', 'row_array']); - - $row = $this->response->row_array(); - - return $row; - } - - /** - * @return mixed - */ - public function result() - { - $this->trigger_events('result'); - - $result = $this->response->result(); - - return $result; - } - - /** - * @return array|mixed - */ - public function result_array() - { - $this->trigger_events(['result', 'result_array']); - - $result = $this->response->result_array(); - - return $result; - } - - /** - * @return int - */ - public function num_rows() - { - $this->trigger_events(['num_rows']); - - $result = $this->response->num_rows(); - - return $result; - } - - /** - * users - * - * @param array|null $groups - * - * @return static - * @author Ben Edmunds - */ - public function users($groups = NULL) - { - $this->trigger_events('users'); - - if (isset($this->_ion_select) && !empty($this->_ion_select)) - { - foreach ($this->_ion_select as $select) - { - $this->db->select($select); - } - - $this->_ion_select = []; - } - else - { - // default selects - $this->db->select([ - $this->tables['users'].'.*', - $this->tables['users'].'.id as id', - $this->tables['users'].'.id as user_id' - ]); - } - - // filter by group id(s) if passed - if (isset($groups)) - { - // build an array if only one group was passed - if (!is_array($groups)) - { - $groups = [$groups]; - } - - // join and then run a where_in against the group ids - if (isset($groups) && !empty($groups)) - { - $this->db->distinct(); - $this->db->join( - $this->tables['users_groups'], - $this->tables['users_groups'].'.'.$this->join['users'].'='.$this->tables['users'].'.id', - 'inner' - ); - } - - // verify if group name or group id was used and create and put elements in different arrays - $group_ids = []; - $group_names = []; - foreach($groups as $group) - { - if(is_numeric($group)) $group_ids[] = $group; - else $group_names[] = $group; - } - $or_where_in = (!empty($group_ids) && !empty($group_names)) ? 'or_where_in' : 'where_in'; - // if group name was used we do one more join with groups - if(!empty($group_names)) - { - $this->db->join($this->tables['groups'], $this->tables['users_groups'] . '.' . $this->join['groups'] . ' = ' . $this->tables['groups'] . '.id', 'inner'); - $this->db->where_in($this->tables['groups'] . '.name', $group_names); - } - if(!empty($group_ids)) - { - $this->db->{$or_where_in}($this->tables['users_groups'].'.'.$this->join['groups'], $group_ids); - } - } - - $this->trigger_events('extra_where'); - - // run each where that was passed - if (isset($this->_ion_where) && !empty($this->_ion_where)) - { - foreach ($this->_ion_where as $where) - { - $this->db->where($where); - } - - $this->_ion_where = []; - } - - if (isset($this->_ion_like) && !empty($this->_ion_like)) - { - foreach ($this->_ion_like as $like) - { - $this->db->or_like($like['like'], $like['value'], $like['position']); - } - - $this->_ion_like = []; - } - - if (isset($this->_ion_limit) && isset($this->_ion_offset)) - { - $this->db->limit($this->_ion_limit, $this->_ion_offset); - - $this->_ion_limit = NULL; - $this->_ion_offset = NULL; - } - else if (isset($this->_ion_limit)) - { - $this->db->limit($this->_ion_limit); - - $this->_ion_limit = NULL; - } - - // set the order - if (isset($this->_ion_order_by) && isset($this->_ion_order)) - { - $this->db->order_by($this->_ion_order_by, $this->_ion_order); - - $this->_ion_order = NULL; - $this->_ion_order_by = NULL; - } - - $this->response = $this->db->get($this->tables['users']); - - return $this; - } - - /** - * user - * - * @param int|string|null $id - * - * @return static - * @author Ben Edmunds - */ - public function user($id = NULL) - { - $this->trigger_events('user'); - - // if no id was passed use the current users id - $id = isset($id) ? $id : $this->session->userdata('user_id'); - - $this->limit(1); - $this->order_by($this->tables['users'].'.id', 'desc'); - $this->where($this->tables['users'].'.id', $id); - - $this->users(); - - return $this; - } - - /** - * get_users_groups - * - * @param int|string|bool $id - * - * @return CI_DB_result - * @author Ben Edmunds - */ - public function get_users_groups($id = FALSE) - { - $this->trigger_events('get_users_group'); - - // if no id was passed use the current users id - $id || $id = $this->session->userdata('user_id'); - - return $this->db->select($this->tables['users_groups'].'.'.$this->join['groups'].' as id, '.$this->tables['groups'].'.name, '.$this->tables['groups'].'.description') - ->where($this->tables['users_groups'].'.'.$this->join['users'], $id) - ->join($this->tables['groups'], $this->tables['users_groups'].'.'.$this->join['groups'].'='.$this->tables['groups'].'.id') - ->get($this->tables['users_groups']); - } - - /** - * @param int|string|array $check_group group(s) to check - * @param int|string|bool $id user id - * @param bool $check_all check if all groups is present, or any of the groups - * - * @return bool Whether the/all user(s) with the given ID(s) is/are in the given group - * @author Phil Sturgeon - **/ - public function in_group($check_group, $id = FALSE, $check_all = FALSE) - { - $this->trigger_events('in_group'); - - $id || $id = $this->session->userdata('user_id'); - - if (!is_array($check_group)) - { - $check_group = [$check_group]; - } - - if (isset($this->_cache_user_in_group[$id])) - { - $groups_array = $this->_cache_user_in_group[$id]; - } - else - { - $users_groups = $this->get_users_groups($id)->result(); - $groups_array = []; - foreach ($users_groups as $group) - { - $groups_array[$group->id] = $group->name; - } - $this->_cache_user_in_group[$id] = $groups_array; - } - foreach ($check_group as $key => $value) - { - $groups = (is_numeric($value)) ? array_keys($groups_array) : $groups_array; - - /** - * if !all (default), in_array - * if all, !in_array - */ - if (in_array($value, $groups) xor $check_all) - { - /** - * if !all (default), true - * if all, false - */ - return !$check_all; - } - } - - /** - * if !all (default), false - * if all, true - */ - return $check_all; - } - - /** - * add_to_group - * - * @param array|int|float|string $group_ids - * @param bool|int|float|string $user_id - * - * @return int - * @author Ben Edmunds - */ - public function add_to_group($group_ids, $user_id = FALSE) - { - $this->trigger_events('add_to_group'); - - // if no id was passed use the current users id - $user_id || $user_id = $this->session->userdata('user_id'); - - if(!is_array($group_ids)) - { - $group_ids = [$group_ids]; - } - - $return = 0; - - // Then insert each into the database - foreach ($group_ids as $group_id) - { - // Cast to float to support bigint data type - if ($this->db->insert($this->tables['users_groups'], - [ $this->join['groups'] => (float)$group_id, - $this->join['users'] => (float)$user_id ])) - { - if (isset($this->_cache_groups[$group_id])) - { - $group_name = $this->_cache_groups[$group_id]; - } - else - { - $group = $this->group($group_id)->result(); - $group_name = $group[0]->name; - $this->_cache_groups[$group_id] = $group_name; - } - $this->_cache_user_in_group[$user_id][$group_id] = $group_name; - - // Return the number of groups added - $return++; - } - } - - return $return; - } - - /** - * remove_from_group - * - * @param array|int|float|string|bool $group_ids - * @param int|float|string|bool $user_id - * - * @return bool - * @author Ben Edmunds - */ - public function remove_from_group($group_ids = FALSE, $user_id = FALSE) - { - $this->trigger_events('remove_from_group'); - - // user id is required - if (empty($user_id)) - { - return FALSE; - } - - // if group id(s) are passed remove user from the group(s) - if (!empty($group_ids)) - { - if (!is_array($group_ids)) - { - $group_ids = [$group_ids]; - } - - foreach ($group_ids as $group_id) - { - // Cast to float to support bigint data type - $this->db->delete( - $this->tables['users_groups'], - [$this->join['groups'] => (float)$group_id, $this->join['users'] => (float)$user_id] - ); - if (isset($this->_cache_user_in_group[$user_id]) && isset($this->_cache_user_in_group[$user_id][$group_id])) - { - unset($this->_cache_user_in_group[$user_id][$group_id]); - } - } - - $return = TRUE; - } - // otherwise remove user from all groups - else - { - // Cast to float to support bigint data type - if ($return = $this->db->delete($this->tables['users_groups'], [$this->join['users'] => (float)$user_id])) - { - $this->_cache_user_in_group[$user_id] = []; - } - } - return $return; - } - - /** - * groups - * - * @return static - * @author Ben Edmunds - */ - public function groups() - { - $this->trigger_events('groups'); - - // run each where that was passed - if (isset($this->_ion_where) && !empty($this->_ion_where)) - { - foreach ($this->_ion_where as $where) - { - $this->db->where($where); - } - $this->_ion_where = []; - } - - if (isset($this->_ion_limit) && isset($this->_ion_offset)) - { - $this->db->limit($this->_ion_limit, $this->_ion_offset); - - $this->_ion_limit = NULL; - $this->_ion_offset = NULL; - } - else if (isset($this->_ion_limit)) - { - $this->db->limit($this->_ion_limit); - - $this->_ion_limit = NULL; - } - - // set the order - if (isset($this->_ion_order_by) && isset($this->_ion_order)) - { - $this->db->order_by($this->_ion_order_by, $this->_ion_order); - } - - $this->response = $this->db->get($this->tables['groups']); - - return $this; - } - - /** - * group - * - * @param int|string|null $id - * - * @return static - * @author Ben Edmunds - */ - public function group($id = NULL) - { - $this->trigger_events('group'); - - if (isset($id)) - { - $this->where($this->tables['groups'].'.id', $id); - } - - $this->limit(1); - $this->order_by('id', 'desc'); - - return $this->groups(); - } - - /** - * update - * - * @param int|string $id - * @param array $data - * - * @return bool - * @author Phil Sturgeon - */ - public function update($id, array $data) - { - $this->trigger_events('pre_update_user'); - - $user = $this->user($id)->row(); - - $this->db->trans_begin(); - - if (array_key_exists($this->identity_column, $data) && $this->identity_check($data[$this->identity_column]) && $user->{$this->identity_column} !== $data[$this->identity_column]) - { - $this->db->trans_rollback(); - $this->set_error('account_creation_duplicate_identity'); - - $this->trigger_events(['post_update_user', 'post_update_user_unsuccessful']); - $this->set_error('update_unsuccessful'); - - return FALSE; - } - - // Filter the data passed - $data = $this->_filter_data($this->tables['users'], $data); - - if (array_key_exists($this->identity_column, $data) || array_key_exists('password', $data) || array_key_exists('email', $data)) - { - if (array_key_exists('password', $data)) - { - if( ! empty($data['password'])) - { - $data['password'] = $this->hash_password($data['password'], $user->{$this->identity_column}); - if ($data['password'] === FALSE) - { - $this->db->trans_rollback(); - $this->trigger_events(['post_update_user', 'post_update_user_unsuccessful']); - $this->set_error('update_unsuccessful'); - - return FALSE; - } - } - else - { - // unset password so it doesn't effect database entry if no password passed - unset($data['password']); - } - } - } - - $this->trigger_events('extra_where'); - $this->db->update($this->tables['users'], $data, ['id' => $user->id]); - - if ($this->db->trans_status() === FALSE) - { - $this->db->trans_rollback(); - - $this->trigger_events(['post_update_user', 'post_update_user_unsuccessful']); - $this->set_error('update_unsuccessful'); - return FALSE; - } - - $this->db->trans_commit(); - - $this->trigger_events(['post_update_user', 'post_update_user_successful']); - $this->set_message('update_successful'); - return TRUE; - } - - /** - * delete_user - * - * @param int|string $id - * - * @return bool - * @author Phil Sturgeon - */ - public function delete_user($id) - { - $this->trigger_events('pre_delete_user'); - - $this->db->trans_begin(); - - // remove user from groups - $this->remove_from_group(NULL, $id); - - // delete user from users table should be placed after remove from group - $this->db->delete($this->tables['users'], ['id' => $id]); - - if ($this->db->trans_status() === FALSE) - { - $this->db->trans_rollback(); - $this->trigger_events(['post_delete_user', 'post_delete_user_unsuccessful']); - $this->set_error('delete_unsuccessful'); - return FALSE; - } - - $this->db->trans_commit(); - - $this->trigger_events(['post_delete_user', 'post_delete_user_successful']); - $this->set_message('delete_successful'); - return TRUE; - } - - /** - * update_last_login - * - * @param int|string $id - * - * @return bool - * @author Ben Edmunds - */ - public function update_last_login($id) - { - $this->trigger_events('update_last_login'); - - $this->load->helper('date'); - - $this->trigger_events('extra_where'); - - $this->db->update($this->tables['users'], ['last_login' => time()], ['id' => $id]); - - return $this->db->affected_rows() == 1; - } - - /** - * set_lang - * - * @param string $lang - * - * @return bool - * @author Ben Edmunds - */ - public function set_lang($lang = 'en') - { - $this->trigger_events('set_lang'); - - // if the user_expire is set to zero we'll set the expiration two years from now. - if($this->config->item('user_expire', 'ion_auth') === 0) - { - $expire = self::MAX_COOKIE_LIFETIME; - } - // otherwise use what is set - else - { - $expire = $this->config->item('user_expire', 'ion_auth'); - } - - set_cookie([ - 'name' => 'lang_code', - 'value' => $lang, - 'expire' => $expire - ]); - - return TRUE; - } - - /** - * set_session - * - * @param object $user - * - * @return bool - * @author jrmadsen67 - */ - public function set_session($user) - { - $this->trigger_events('pre_set_session'); - - $session_data = [ - 'identity' => $user->{$this->identity_column}, - $this->identity_column => $user->{$this->identity_column}, - 'email' => $user->email, - 'user_id' => $user->id, //everyone likes to overwrite id so we'll use user_id - 'old_last_login' => $user->last_login, - 'last_check' => time(), - ]; - - $this->session->set_userdata($session_data); - - $this->trigger_events('post_set_session'); - - return TRUE; - } - - /** - * Set a user to be remembered - * - * Implemented as described in - * https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence - * - * @param string $identity - * - * @return bool - * @author Ben Edmunds - */ - public function remember_user($identity) - { - $this->trigger_events('pre_remember_user'); - - if (!$identity) - { - return FALSE; - } - - // Generate random tokens - $token = $this->_generate_selector_validator_couple(); - - if ($token->validator_hashed) - { - $this->db->update($this->tables['users'], - [ 'remember_selector' => $token->selector, - 'remember_code' => $token->validator_hashed ], - [ $this->identity_column => $identity ]); - - if ($this->db->affected_rows() > -1) - { - // if the user_expire is set to zero we'll set the expiration two years from now. - if($this->config->item('user_expire', 'ion_auth') === 0) - { - $expire = self::MAX_COOKIE_LIFETIME; - } - // otherwise use what is set - else - { - $expire = $this->config->item('user_expire', 'ion_auth'); - } - - set_cookie([ - 'name' => $this->config->item('remember_cookie_name', 'ion_auth'), - 'value' => $token->user_code, - 'expire' => $expire - ]); - - $this->trigger_events(['post_remember_user', 'remember_user_successful']); - return TRUE; - } - } - - $this->trigger_events(['post_remember_user', 'remember_user_unsuccessful']); - return FALSE; - } - - /** - * Login automatically a user with the "Remember me" feature - * Implemented as described in - * https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence - * - * @return bool - * @author Ben Edmunds - */ - public function login_remembered_user() - { - $this->trigger_events('pre_login_remembered_user'); - - // Retrieve token from cookie - $remember_cookie = get_cookie($this->config->item('remember_cookie_name', 'ion_auth')); - $token = $this->_retrieve_selector_validator_couple($remember_cookie); - - if ($token === FALSE) - { - $this->trigger_events(['post_login_remembered_user', 'post_login_remembered_user_unsuccessful']); - return FALSE; - } - - // get the user with the selector - $this->trigger_events('extra_where'); - $query = $this->db->select($this->identity_column . ', id, email, remember_code, last_login') - ->where('remember_selector', $token->selector) - ->where('active', 1) - ->limit(1) - ->get($this->tables['users']); - - // Check that we got the user - if ($query->num_rows() === 1) - { - // Retrieve the information - $user = $query->row(); - - // Check the code against the validator - $identity = $user->{$this->identity_column}; - if ($this->verify_password($token->validator, $user->remember_code, $identity)) - { - $this->update_last_login($user->id); - - $this->set_session($user); - - $this->clear_forgotten_password_code($identity); - - // extend the users cookies if the option is enabled - if ($this->config->item('user_extend_on_login', 'ion_auth')) - { - $this->remember_user($identity); - } - - // Regenerate the session (for security purpose: to avoid session fixation) - $this->session->sess_regenerate(FALSE); - - $this->trigger_events(['post_login_remembered_user', 'post_login_remembered_user_successful']); - return TRUE; - } - } - delete_cookie($this->config->item('remember_cookie_name', 'ion_auth')); - - $this->trigger_events(['post_login_remembered_user', 'post_login_remembered_user_unsuccessful']); - return FALSE; - } - - - /** - * create_group - * - * @param string|bool $group_name - * @param string $group_description - * @param array $additional_data - * - * @return int|bool The ID of the inserted group, or FALSE on failure - * @author aditya menon - */ - public function create_group($group_name = FALSE, $group_description = '', $additional_data = []) - { - // bail if the group name was not passed - if(!$group_name) - { - $this->set_error('group_name_required'); - return FALSE; - } - - // bail if the group name already exists - $existing_group = $this->db->get_where($this->tables['groups'], ['name' => $group_name])->num_rows(); - if($existing_group !== 0) - { - $this->set_error('group_already_exists'); - return FALSE; - } - - $data = ['name'=>$group_name,'description'=>$group_description]; - - // filter out any data passed that doesnt have a matching column in the groups table - // and merge the set group data and the additional data - if (!empty($additional_data)) $data = array_merge($this->_filter_data($this->tables['groups'], $additional_data), $data); - - $this->trigger_events('extra_group_set'); - - // insert the new group - $this->db->insert($this->tables['groups'], $data); - $group_id = $this->db->insert_id($this->tables['groups'] . '_id_seq'); - - // report success - $this->set_message('group_creation_successful'); - // return the brand new group id - return $group_id; - } - - /** - * update_group - * - * @param int|string|bool $group_id - * @param string|bool $group_name - * @param array $additional_data - * - * @return bool - * @author aditya menon - */ - public function update_group($group_id = FALSE, $group_name = FALSE, $additional_data = []) - { - if (empty($group_id)) - { - return FALSE; - } - - $data = []; - - if (!empty($group_name)) - { - // we are changing the name, so do some checks - - // bail if the group name already exists - $existing_group = $this->db->get_where($this->tables['groups'], ['name' => $group_name])->row(); - if (isset($existing_group->id) && $existing_group->id != $group_id) - { - $this->set_error('group_already_exists'); - return FALSE; - } - - $data['name'] = $group_name; - } - - // restrict change of name of the admin group - $group = $this->db->get_where($this->tables['groups'], ['id' => $group_id])->row(); - if ($this->config->item('admin_group', 'ion_auth') === $group->name && $group_name !== $group->name) - { - $this->set_error('group_name_admin_not_alter'); - return FALSE; - } - - // filter out any data passed that doesnt have a matching column in the groups table - // and merge the set group data and the additional data - if (!empty($additional_data)) - { - $data = array_merge($this->_filter_data($this->tables['groups'], $additional_data), $data); - } - - $this->db->update($this->tables['groups'], $data, ['id' => $group_id]); - - $this->set_message('group_update_successful'); - - return TRUE; - } - - /** - * delete_group - * - * @param int|string|bool $group_id - * - * @return bool - * @author aditya menon - */ - public function delete_group($group_id = FALSE) - { - // bail if mandatory param not set - if(!$group_id || empty($group_id)) - { - return FALSE; - } - $group = $this->group($group_id)->row(); - if($group->name == $this->config->item('admin_group', 'ion_auth')) - { - $this->trigger_events(['post_delete_group', 'post_delete_group_notallowed']); - $this->set_error('group_delete_notallowed'); - return FALSE; - } - - $this->trigger_events('pre_delete_group'); - - $this->db->trans_begin(); - - // remove all users from this group - $this->db->delete($this->tables['users_groups'], [$this->join['groups'] => $group_id]); - // remove the group itself - $this->db->delete($this->tables['groups'], ['id' => $group_id]); - - if ($this->db->trans_status() === FALSE) - { - $this->db->trans_rollback(); - $this->trigger_events(['post_delete_group', 'post_delete_group_unsuccessful']); - $this->set_error('group_delete_unsuccessful'); - return FALSE; - } - - $this->db->trans_commit(); - - $this->trigger_events(['post_delete_group', 'post_delete_group_successful']); - $this->set_message('group_delete_successful'); - return TRUE; - } - - /** - * @param string $event - * @param string $name - * @param string $class - * @param string $method - * @param array $arguments - */ - public function set_hook($event, $name, $class, $method, $arguments) - { - $this->_ion_hooks->{$event}[$name] = new stdClass; - $this->_ion_hooks->{$event}[$name]->class = $class; - $this->_ion_hooks->{$event}[$name]->method = $method; - $this->_ion_hooks->{$event}[$name]->arguments = $arguments; - } - - /** - * @param string $event - * @param string $name - */ - public function remove_hook($event, $name) - { - if (isset($this->_ion_hooks->{$event}[$name])) - { - unset($this->_ion_hooks->{$event}[$name]); - } - } - - /** - * @param string $event - */ - public function remove_hooks($event) - { - if (isset($this->_ion_hooks->$event)) - { - unset($this->_ion_hooks->$event); - } - } - - /** - * @param string $event - * @param string $name - * - * @return bool|mixed - */ - protected function _call_hook($event, $name) - { - if (isset($this->_ion_hooks->{$event}[$name]) && method_exists($this->_ion_hooks->{$event}[$name]->class, $this->_ion_hooks->{$event}[$name]->method)) - { - $hook = $this->_ion_hooks->{$event}[$name]; - - return call_user_func_array([$hook->class, $hook->method], $hook->arguments); - } - - return FALSE; - } - - /** - * @param string|array $events - */ - public function trigger_events($events) - { - if (is_array($events) && !empty($events)) - { - foreach ($events as $event) - { - $this->trigger_events($event); - } - } - else - { - if (isset($this->_ion_hooks->$events) && !empty($this->_ion_hooks->$events)) - { - foreach ($this->_ion_hooks->$events as $name => $hook) - { - $this->_call_hook($events, $name); - } - } - } - } - - /** - * set_message_delimiters - * - * Set the message delimiters - * - * @param string $start_delimiter - * @param string $end_delimiter - * - * @return true - * @author Ben Edmunds - */ - public function set_message_delimiters($start_delimiter, $end_delimiter) - { - $this->message_start_delimiter = $start_delimiter; - $this->message_end_delimiter = $end_delimiter; - - return TRUE; - } - - /** - * set_error_delimiters - * - * Set the error delimiters - * - * @param string $start_delimiter - * @param string $end_delimiter - * - * @return true - * @author Ben Edmunds - */ - public function set_error_delimiters($start_delimiter, $end_delimiter) - { - $this->error_start_delimiter = $start_delimiter; - $this->error_end_delimiter = $end_delimiter; - - return TRUE; - } - - /** - * set_message - * - * Set a message - * - * @param string $message The message - * - * @return string The given message - * @author Ben Edmunds - */ - public function set_message($message) - { - $this->messages[] = $message; - - return $message; - } - - /** - * messages - * - * Get the messages - * - * @return string - * @author Ben Edmunds - */ - public function messages() - { - $_output = ''; - foreach ($this->messages as $message) - { - $messageLang = $this->lang->line($message) ? $this->lang->line($message) : '##' . $message . '##'; - $_output .= $this->message_start_delimiter . $messageLang . $this->message_end_delimiter; - } - - return $_output; - } - - /** - * messages as array - * - * Get the messages as an array - * - * @param bool $langify - * - * @return array - * @author Raul Baldner Junior - */ - public function messages_array($langify = TRUE) - { - if ($langify) - { - $_output = []; - foreach ($this->messages as $message) - { - $messageLang = $this->lang->line($message) ? $this->lang->line($message) : '##' . $message . '##'; - $_output[] = $this->message_start_delimiter . $messageLang . $this->message_end_delimiter; - } - return $_output; - } - else - { - return $this->messages; - } - } - - /** - * clear_messages - * - * Clear messages - * - * @return true - * @author Ben Edmunds - */ - public function clear_messages() - { - $this->messages = []; - - return TRUE; - } - - /** - * set_error - * - * Set an error message - * - * @param string $error The error to set - * - * @return string The given error - * @author Ben Edmunds - */ - public function set_error($error) - { - $this->errors[] = $error; - - return $error; - } - - /** - * errors - * - * Get the error message - * - * @return string - * @author Ben Edmunds - */ - public function errors() - { - $_output = ''; - foreach ($this->errors as $error) - { - $errorLang = $this->lang->line($error) ? $this->lang->line($error) : '##' . $error . '##'; - $_output .= $this->error_start_delimiter . $errorLang . $this->error_end_delimiter; - } - - return $_output; - } - - /** - * errors as array - * - * Get the error messages as an array - * - * @param bool $langify - * - * @return array - * @author Raul Baldner Junior - */ - public function errors_array($langify = TRUE) - { - if ($langify) - { - $_output = []; - foreach ($this->errors as $error) - { - $errorLang = $this->lang->line($error) ? $this->lang->line($error) : '##' . $error . '##'; - $_output[] = $this->error_start_delimiter . $errorLang . $this->error_end_delimiter; - } - return $_output; - } - else - { - return $this->errors; - } - } - - /** - * clear_errors - * - * Clear Errors - * - * @return true - * @author Ben Edmunds - */ - public function clear_errors() - { - $this->errors = []; - - return TRUE; - } - - /** - * Internal function to set a password in the database - * - * @param string $identity - * @param string $password - * - * @return bool - */ - protected function _set_password_db($identity, $password) - { - $hash = $this->hash_password($password, $identity); - - if ($hash === FALSE) - { - return FALSE; - } - - // When setting a new password, invalidate any other token - $data = [ - 'password' => $hash, - 'remember_code' => NULL, - 'forgotten_password_code' => NULL, - 'forgotten_password_time' => NULL - ]; - - $this->trigger_events('extra_where'); - - $this->db->update($this->tables['users'], $data, [$this->identity_column => $identity]); - - return $this->db->affected_rows() == 1; - } - - /** - * @param string $table - * @param array $data - * - * @return array - */ - protected function _filter_data($table, $data) - { - $filtered_data = []; - $columns = $this->db->list_fields($table); - - if (is_array($data)) - { - foreach ($columns as $column) - { - if (array_key_exists($column, $data)) - $filtered_data[$column] = $data[$column]; - } - } - - return $filtered_data; - } - - - /** Generate a random token - * Inspired from http://php.net/manual/en/function.random-bytes.php#118932 - * - * @param int $result_length - * @return string - */ - protected function _random_token($result_length = 32) - { - if(!isset($result_length) || intval($result_length) <= 8 ){ - $result_length = 32; - } - - // Try random_bytes: PHP 7 - if (function_exists('random_bytes')) { - return bin2hex(random_bytes($result_length / 2)); - } - - // Try mcrypt - if (function_exists('mcrypt_create_iv')) { - return bin2hex(mcrypt_create_iv($result_length / 2, MCRYPT_DEV_URANDOM)); - } - - // Try openssl - if (function_exists('openssl_random_pseudo_bytes')) { - return bin2hex(openssl_random_pseudo_bytes($result_length / 2)); - } - - // No luck! - return FALSE; - } - - /** Retrieve hash parameter according to options - * - * @param string $identity - * - * @return array|bool - */ - protected function _get_hash_parameters($identity = NULL) - { - // Check if user is administrator or not - $is_admin = FALSE; - if ($identity) - { - $user_id = $this->get_user_id_from_identity($identity); - if ($user_id && $this->in_group($this->config->item('admin_group', 'ion_auth'), $user_id)) - { - $is_admin = TRUE; - } - } - - $params = FALSE; - switch ($this->hash_method) - { - case 'bcrypt': - $params = [ - 'cost' => $is_admin ? $this->config->item('bcrypt_admin_cost', 'ion_auth') - : $this->config->item('bcrypt_default_cost', 'ion_auth') - ]; - break; - - case 'argon2': - $params = $is_admin ? $this->config->item('argon2_admin_params', 'ion_auth') - : $this->config->item('argon2_default_params', 'ion_auth'); - break; - - default: - // Do nothing - } - - return $params; - } - - /** Retrieve hash algorithm according to options - * - * @return string|bool - */ - protected function _get_hash_algo() - { - $algo = FALSE; - switch ($this->hash_method) - { - case 'bcrypt': - $algo = PASSWORD_BCRYPT; - break; - - case 'argon2': - $algo = PASSWORD_ARGON2I; - break; - - default: - // Do nothing - } - - return $algo; - } - - /** - * Generate a random selector/validator couple - * - * @param $selector_size int size of the selector token - * @param $validator_size int size of the validator token - * - * @return object - * ->selector simple token to retrieve the user (to store in DB) - * ->validator_hashed token (hashed) to validate the user (to store in DB) - * ->user_code code to be used user-side (in cookie or URL) - */ - protected function _generate_selector_validator_couple($selector_size = 40, $validator_size = 128) - { - // The selector is a simple token to retrieve the user - $selector = $this->_random_token($selector_size); - - // The validator will strictly validate the user and should be more complex - $validator = $this->_random_token($validator_size); - - // The validator is hashed for storing in DB (avoid session stealing in case of DB leaked) - $validator_hashed = $this->hash_password($validator); - - // The code to be used user-side - $user_code = "$selector.$validator"; - - return (object) [ - 'selector' => $selector, - 'validator_hashed' => $validator_hashed, - 'user_code' => $user_code, - ]; - } - - /** - * Retrieve remember cookie info - * - * @param $user_code string - * - * @return object - * ->selector simple token to retrieve the user in DB - * ->validator token to validate the user (check against hashed value in DB) - */ - protected function _retrieve_selector_validator_couple($user_code) - { - // Check code - if ($user_code) - { - $tokens = explode('.', $user_code); - - // Check tokens - if (count($tokens) === 2) - { - return (object) [ - 'selector' => $tokens[0], - 'validator' => $tokens[1] - ]; - } - } - - return FALSE; - } - - /** - * Handle legacy sha1 password - * - * We expect the configuration to still have: - * store_salt - * salt_length - * - * @TODO to be removed in later version - * - * @param string $identity - * @param string $password - * @param string $hashed_password_db - * - * @return bool - **/ - protected function _password_verify_sha1_legacy($identity, $password, $hashed_password_db) - { - $this->trigger_events('pre_sha1_password_migration'); - - if ($this->config->item('store_salt', 'ion_auth')) - { - // Salt is store at the side, retrieve it - $query = $this->db->select('salt') - ->where($this->identity_column, $identity) - ->limit(1) - ->get($this->tables['users']); - - $salt_db = $query->row(); - - if ($query->num_rows() !== 1) - { - $this->trigger_events(['post_sha1_password_migration', 'post_sha1_password_migration_unsuccessful']); - return FALSE; - } - - $hashed_password = sha1($password . $salt_db->salt); - } - else - { - // Salt is stored along with password - $salt_length = $this->config->item('salt_length', 'ion_auth'); - - if (!$salt_length) - { - $this->trigger_events(['post_sha1_password_migration', 'post_sha1_password_migration_unsuccessful']); - return FALSE; - } - - $salt = substr($hashed_password_db, 0, $salt_length); - - $hashed_password = $salt . substr(sha1($salt . $password), 0, -$salt_length); - } - - // Now we can compare them - if($hashed_password === $hashed_password_db) - { - // Password is good, migrate it to latest - $result = $this->_set_password_db($identity, $password); - - if ($result) - { - $this->trigger_events(['post_sha1_password_migration', 'post_sha1_password_migration_successful']); - } - else - { - $this->trigger_events(['post_sha1_password_migration', 'post_sha1_password_migration_unsuccessful']); - } - - return $result; - } - else - { - // Password mismatch, we cannot migrate... - $this->trigger_events(['post_sha1_password_migration', 'post_sha1_password_migration_unsuccessful']); - return FALSE; - } - } -} diff --git a/sql/ion_auth.mssql.sql b/sql/ion_auth.mssql.sql index 26b404a10..38694b893 100644 --- a/sql/ion_auth.mssql.sql +++ b/sql/ion_auth.mssql.sql @@ -20,13 +20,22 @@ CREATE TABLE users ( phone varchar(20), PRIMARY KEY(id), CONSTRAINT uc_email UNIQUE (email), - CONSTRAINT uc_activation_selector UNIQUE (activation_selector), - CONSTRAINT uc_forgotten_password_selector UNIQUE (forgotten_password_selector), - CONSTRAINT uc_remember_selector UNIQUE (remember_selector), CONSTRAINT users_check_id CHECK(id >= 0), CONSTRAINT users_check_active CHECK(active >= 0) ); +/* Create index on col that can by NULL */ +CREATE UNIQUE INDEX uc_activation_selector + ON users (activation_selector) + WHERE activation_selector IS NOT NULL + +CREATE UNIQUE INDEX uc_remember_selector + ON users (remember_selector) + WHERE remember_selector IS NOT NULL + +CREATE UNIQUE INDEX uc_forgotten_password_selector + ON users (forgotten_password_selector) + WHERE forgotten_password_selector IS NOT NULL CREATE TABLE groups ( id int NOT NULL IDENTITY(1,1), diff --git a/sql/migrating_from_ionauth2/migrate.mssql.sql b/sql/migrating_from_ionauth2/migrate.mssql.sql index 089a0b80d..97433870d 100644 --- a/sql/migrating_from_ionauth2/migrate.mssql.sql +++ b/sql/migrating_from_ionauth2/migrate.mssql.sql @@ -30,14 +30,14 @@ ALTER TABLE users ADD CONSTRAINT uc_email UNIQUE (email); -ALTER TABLE users - ADD CONSTRAINT uc_activation_selector - UNIQUE (activation_selector); - -ALTER TABLE users - ADD CONSTRAINT uc_remember_selector - UNIQUE (remember_selector); - -ALTER TABLE users - ADD CONSTRAINT uc_forgotten_password_selector - UNIQUE (forgotten_password_selector); +CREATE UNIQUE INDEX uc_activation_selector + ON users (activation_selector) + WHERE activation_selector IS NOT NULL + +CREATE UNIQUE INDEX uc_remember_selector + ON users (remember_selector) + WHERE remember_selector IS NOT NULL + +CREATE UNIQUE INDEX uc_forgotten_password_selector + ON users (forgotten_password_selector) + WHERE forgotten_password_selector IS NOT NULL diff --git a/tests/IonAuthLibraryTest.php b/tests/IonAuthLibraryTest.php new file mode 100644 index 000000000..453262d90 --- /dev/null +++ b/tests/IonAuthLibraryTest.php @@ -0,0 +1,67 @@ + + * @license https://opensource.org/licenses/MIT MIT License + */ + +/** + * IonAuth\Libraries\IonAuth tests + * + * @package CodeIgniter-Ion-Auth + */ +class IonAuthLibraryTest extends \CIUnitTestCase +{ + /** + * Test forgottenPassword() + * + * @return void + */ + public function testForgottenPassword() + { + $ionAuthLibrary = new \IonAuth\Libraries\IonAuth(); + + $this->assertNotEmpty($ionAuthLibrary->forgottenPassword('admin@admin.com')); + } + + /** + * Test register() + * + * @return void + */ + public function testRegister() + { + $ionAuthLibrary = new \IonAuth\Libraries\IonAuth(); + + $this->assertGreaterThan(1, $ionAuthLibrary->register(random_string(), random_string(), random_string())); + } + + /** + * Test loggedIn() + * + * @return void + */ + public function testLoggedIn(): void + { + $ionAuthLibrary = new \IonAuth\Libraries\IonAuth(); + $this->assertFalse($ionAuthLibrary->loggedIn()); + } + + /** + * Test isAdmin() + * + * @return void + */ + public function testIsAdmin() + { + $ionAuthLibrary = new \IonAuth\Libraries\IonAuth(); + + $this->assertTrue($ionAuthLibrary->isAdmin(1)); + + $this->assertFalse($ionAuthLibrary->isAdmin(2)); + } +} diff --git a/tests/IonAuthModelTest.php b/tests/IonAuthModelTest.php new file mode 100644 index 000000000..8e7c1f6c2 --- /dev/null +++ b/tests/IonAuthModelTest.php @@ -0,0 +1,246 @@ + + * @license https://opensource.org/licenses/MIT MIT License + */ + +use IonAuth\Models\IonAuthModel; + +/** + * IonAuthModel tests + * + * @package CodeIgniter-Ion-Auth + */ +class IonAuthModelTest extends \CodeIgniter\Test\CIDatabaseTestCase +{ + /** + * Should the db be refreshed before + * each test? + * + * @var boolean + */ + protected $refresh = false; + + /** + * @var IonAuthModel + */ + private $model; + + + public function setUp() + { + parent::setUp(); + $this->model = new IonAuthModel(); + } + + /** + * Test : + * - deactivate + * - activate + * + * @return void + */ + public function testActivateDeactivate() + { + $this->assertTrue($this->model->deactivate(1)); + $this->assertTrue($this->model->activate(1)); + } + + /** + * Test emailCheck + * + * @return void + */ + public function testEmailCheck() + { + $this->assertTrue($this->model->emailCheck('admin@admin.com')); + $this->assertFalse($this->model->emailCheck('')); + $this->assertFalse($this->model->emailCheck('email@undefined.unknown')); + } + + /** + * Test getUserByForgottenPasswordCode + * + * @return void + */ + public function testGetUserByForgottenPasswordCode() + { + $this->assertFalse($this->model->getUserByForgottenPasswordCode(random_string() . '.' . random_string())); + } + + /** + * Test register + * + * @return void + */ + public function testRegister() + { + $identity = random_string(); + $password = random_string(); + $email = random_string(); + $this->assertGreaterThan(1, $this->model->register($identity, $password, $email)); + } + + /** + * Test login + * + * @return void + */ + public function testLogin() + { + $this->assertFalse($this->model->login('admin@admin.com', 'bad_password')); + } + + /** + * Test getLastAttemptTime() + * + * @return void + */ + public function testGetLastAttemptTime() + { + config('IonAuth')->trackLoginAttempts = true; + + $this->model->login('admin@admin.com', random_string()); + + $this->assertGreaterThan(0, $this->model->getLastAttemptTime('admin@admin.com')); + + config('IonAuth')->trackLoginAttempts = false; + $this->assertEquals(0, $this->model->getLastAttemptTime('admin@admin.com')); + } + + /** + * Test clearLoginAttempts() + * + * @return void + */ + public function testClearLoginAttempts() + { + config('IonAuth')->trackLoginAttempts = true; + $this->assertTrue($this->model->clearLoginAttempts('admin@admin.com')); + } + + /** + * Test users() + * + * @return void + */ + public function testUsers() + { + $this->assertNotEmpty($this->model->users()); + $this->assertNotEmpty($this->model->users('admin')); + $this->assertNotEmpty($this->model->users(random_string())); + $this->assertNotEmpty($this->model->users(1000)); + } + + /** + * Test removeFromGroup, addToGroup() + * + * @return void + */ + public function testRemoveFromAndAddToGroup() + { + $this->assertTrue($this->model->removeFromGroup(1, 1)); + $this->assertEquals(1, $this->model->addToGroup(1, 1)); + } + + /** + * Test createGroup(), updateGroup(), DeleteGroup() + * + * @return void + */ + public function testCreateUpdateDeleteGroup() + { + $idGroup = $this->model->createGroup(random_string()); + $this->assertTrue($this->model->updateGroup($idGroup, random_string(), ['description' => 'test'])); + $this->assertTrue($this->model->deleteGroup($idGroup)); + } + + /** + * Test setMessage() + * + * @return void + */ + public function testSetMessage() + { + $message = 'Test string'; + $this->assertEquals($message, $this->model->setMessage($message)); + } + + /** + * Test testMessages() + * + * @return void + */ + public function testMessages() + { + $this->assertEmpty($this->model->messages()); + } + + /** + * Test testMessagesArray() + * + * @return void + */ + public function testMessagesArray() + { + $this->assertEmpty($this->model->messagesArray()); + } + + /** + * Test setError() + * + * @return void + */ + public function testSetError() + { + $error = 'Test string'; + $this->assertEquals($error, $this->model->setError($error)); + } + + /** + * Test testErrors() + * + * @return void + */ + public function testErrors() + { + $this->model->setError('Test error !'); + $this->assertContains('Test error !', $this->model->errors()); + } + + /** + * Test errorsArray() + * + * @return void + */ + public function testErrorsArray() + { + $this->assertEmpty($this->model->errorsArray()); + + $this->model->setError('Test string'); + + $this->assertEquals('Test string', $this->model->errorsArray(false)[0]); + + $this->assertEquals('##Test string##', $this->model->errorsArray()[0]); + } + + /** + * Test getErrors() + * + * @return void + */ + public function testGetErrors() + { + $this->assertEmpty($this->model->getErrors()); + + $this->model->setError('Test string'); + + $this->assertEquals('Test string', $this->model->getErrors()[0]); + } + +} diff --git a/userguide/index.html b/userguide/index.html index 9d08f29d5..aaa2ecbf2 100644 --- a/userguide/index.html +++ b/userguide/index.html @@ -50,40 +50,39 @@

Class Functions

  • login()
  • logout()
  • register()
  • -
  • create_user()
  • +
  • createUser()
  • update()
  • -
  • update_user()
  • -
  • delete_user()
  • -
  • forgotten_password()
  • -
  • forgotten_password_check()
  • -
  • logged_in()
  • -
  • is_admin()
  • -
  • in_group()
  • -
  • username_check()
  • -
  • email_check()
  • -
  • identity_check()
  • -
  • is_max_login_attempts_exceeded()
  • -
  • get_attempts_num()
  • -
  • increase_login_attempts()
  • -
  • clear_login_attempts()
  • +
  • updateUser()
  • +
  • deleteUser()
  • +
  • forgottenPassword()
  • +
  • forgottenPasswordCheck()
  • +
  • loggedIn()
  • +
  • isAdmin()
  • +
  • inGroup()
  • +
  • usernameCheck()
  • +
  • emailCheck()
  • +
  • identityCheck()
  • +
  • isMaxLoginAttemptsExceeded()
  • +
  • getAttemptsNum()
  • +
  • increaseLoginAttempts()
  • +
  • clearLoginAttempts()
  • user()
  • users()
  • group()
  • groups()
  • -
  • get_users_groups()
  • -
  • add_to_group()
  • -
  • remove_from_group()
  • -
  • create_group()
  • -
  • update_group()
  • -
  • delete_group()
  • +
  • getUsersGroups()
  • +
  • addToGroup()
  • +
  • removeFromGroup()
  • +
  • createGroup()
  • +
  • updateGroup()
  • +
  • deleteGroup()
  • messages()
  • -
  • messages_array()
  • -
  • set_message_delimiters()
  • +
  • messagesArray()
  • +
  • setMessageTemplate()
  • errors()
  • -
  • errors_array()
  • -
  • set_error_delimiters()
  • -
  • trigger_events()
  • -
  • set_hook()
  • +
  • errorsArray()
  • +
  • triggerEvents()
  • +
  • setHook()
  • @@ -128,11 +127,7 @@

    License

    Server requirements

    - Ion Auth 3 needs CodeIgniter 3 and PHP 5.6.
    - It should work on 5.3.7 as well, but we strongly advise you NOT to run such old versions of PHP, - because of potential security and performance issues.
    - If running an old PHP version, you may need - password_compat. + Ion Auth 4 needs CodeIgniter 4 and PHP 7.1.

    Installation

    @@ -140,7 +135,7 @@

    Installation

    1. Download the latest version: - https://github.com/benedmunds/CodeIgniter-Ion-Auth/zipball/3 + https://github.com/benedmunds/CodeIgniter-Ion-Auth/zipball/4
    2. Copy the files from this package to the correspoding folder in your application folder. For example, copy Ion_auth/config/ion_auth.php to system/application/config/ion_auth.php.
    3. You can also copy the entire directory structure into your third_party/ folder. For example, copy everything to /application/third_party/ion_auth/
    4. @@ -160,7 +155,7 @@

      Upgrading

      1. Download the latest version: - https://github.com/benedmunds/CodeIgniter-Ion-Auth/zipball/3 + https://github.com/benedmunds/CodeIgniter-Ion-Auth/zipball/4
      2. Overwrite "libraries/ion_auth.php" and "models/ion_auth_model.php" with the new versions.
      3. Overwrite "language/*" with the news versions.
      4. @@ -175,7 +170,7 @@

        Upgrading

        Loading Ion Auth

        You load Ion Auth just link any other library:

        -
        $this->load->library('ion_auth');
        +
        $ionAuth = new \IonAuth\Libraries\IonAuth();

        You can also autoload the library.

        @@ -218,7 +213,7 @@

        Tables

        Hash method

        • - hash_method Default is 'bcrypt'
          + hashMethod Default is 'bcrypt'
          The method to hash the password before storing in database. You can choose between bcrypt (from PHP 5.3) or argon2 (from PHP 7.2)
          @@ -231,14 +226,14 @@

          Hash method

        • Bcrypt-specific options:
          • - bcrypt_default_cost Default is 10
            + bcryptDefaultCost Default is 10
            This defines how strong the encryption will be.
            However, higher the cost, longer it will take to hash (CPU usage). So adjust this based on your server hardware.
          • - bcrypt_admin_cost Default is 12
            - Same as bcrypt_default_cost, but for users in the admin group.
            + bcryptAdminCost Default is 12
            + Same as bcryptDefaultCost, but for users in the admin group.
            It is recommended to have a stronger hashing for administrators.
          @@ -253,7 +248,7 @@

          Hash method

        • Argon2-specific options:
          • - argon2_default_params Default is ['memory_cost' => 1 << 12, 'time_cost' => 2, 'threads' => 2]
            + argon2DefaultParams Default is ['memory_cost' => 1 << 12, 'time_cost' => 2, 'threads' => 2]
            This is an array containing the options for the Argon2 algorithm. The following keys can be set:
            ['memory_cost']: Maximum memory (in kBytes) that may be used to compute the Argon2 hash. The spec recommends setting the memory cost to a power of 2.
            @@ -263,8 +258,8 @@

            Hash method

            The spec recommends setting the memory cost to a power of 2.
          • - argon2_admin_params Default is ['memory_cost' => 1 << 14, 'time_cost' => 4, 'threads' => 2]
            - Same as argon2_default_params, but for users in the admin group.
            + argon2AdminParams Default is ['memory_cost' => 1 << 14, 'time_cost' => 4, 'threads' => 2]
            + Same as argon2DefaultParams, but for users in the admin group.
            It is recommended to have a stronger hashing for administrators.
          @@ -283,19 +278,19 @@

          Authentication options

          • - site_title
            + siteTitle
            The title of your site, used for email.
          • - admin_email Default is 'admin@example.com'
            + adminEmail Default is 'admin@example.com'
            Your administrator email address.
          • - default_group Default is 'members'
            + defaultGroup Default is 'members'
            Name of the default user group.
          • - admin_group Default is 'admin'
            + adminGroup Default is 'admin'
            Name of the admin group.
          • @@ -305,7 +300,7 @@

            Authentication options

            IMPORTANT: If you are changing it from the default (email), update the UNIQUE constraint in your DB.
          • - min_password_length Default is '8'
            + minPasswordLength Default is '8'
            Minimum length of passwords.
            This minimum is not enforced directly by the library.
            The controller should define a validation rule to enforce it.
            @@ -314,47 +309,47 @@

            Authentication options

            This is an arbitrary (long) value to protect against DOS attack.
          • - email_activation Default is 'false'
            + emailActivation Default is 'false'
            TRUE or FALSE. Sets whether to require email activation or not.
          • - manual_activation Default is 'false'
            + manualActivation Default is 'false'
            TRUE or FALSE. Sets whether to require manual activation (probably by an admin user) or not.
          • - remember_users Default is 'true'
            - TRUE or FALSE. Sets whether to enable 'remember me' functionality or not. + rememberUsers Default is 'true'
            + true or false. Sets whether to enable 'remember me' functionality or not.
          • - user_expire Default is '86500'
            + userExpire Default is '86500'
            Sets how long to remember the user for in seconds. Set to zero for no expiration.
          • - user_extend_on_login Default is 'false'
            + userExtendonLogin Default is 'false'
            TRUE or FALSE. Extend the users session expiration on login.
          • - track_login_attempts Default is 'false'
            - Track the number of failed login attempts for each user or ip (see track_login_ip_address option). + trackLoginAttempts Default is 'false'
            + Track the number of failed login attempts for each user or ip (see trackLoginIpAddress option).
          • - track_login_ip_address Default is 'true'
            + trackLoginIpAddress Default is 'true'
            Track login attempts by IP Address, if FALSE will track based on identity.
          • - maximum_login_attempts Default is 3
            + maximumLoginAttempts Default is 3
            Set the maximum number of failed login attempts. This maximum is not enforced by the library, but is - used by $this->ion_auth->is_max_login_attempts_exceeded(). The controller should check this function and act appropriately. + used by $this->ionAuth->isMaxLoginAttemptsExceeded(). The controller should check this function and act appropriately. If set to 0, there is no maximum.
          • - forgot_password_expiration Default is 1800
            + forgotPasswordExpiration Default is 1800
            Number of seconds before a forgot password request expires. If set to 0, requests will not expire.
            30 minutes to 1 hour are good values (enough for a user to receive the email and reset its password).
            You should not set a value too high (or 0), as it could lead to security issue!
          • - recheck_timer Default is 0
            + recheckTimer Default is 0
            The number of seconds after which the session is checked again against database to see if the user still exists and is active.
            Leave 0 if you don't want session recheck. if you really think you need to recheck the session @@ -366,7 +361,7 @@

            Cookie options

            • - remember_cookie_name Default is 'remember_code'
              + rememberCookieName Default is 'remember_code'
              Cookie name for the "Remember me" feature.
            @@ -384,39 +379,38 @@

            Templates options

            • - email_templates Default is 'auth/email/'
              + emailTemplates Default is 'auth/email/'
              Folder where the email view templates are stored.
            • - email_activate Default is 'activate.tpl.php'
              + emailActivate Default is 'activate.tpl.php'
              Filname of the email activation view template.
            • - email_forgot_password Default is 'forgot_password.tpl.php'
              + emailForgotPassword Default is 'forgot_password.tpl.php'
              Filname of the forgot password email view template.
            -

            Message Delimiters

            - -
              -
            • - message_start_delimiter Default is '<p>'
              - Starting delimiter for messages. -
            • +

              Errors and Messages Templates

              +
              • - message_end_delimiter Default is '</p>'
                - Ending delimiter for messages. + templates['errors']['list'] Default is specified in 'Config/Validation.php'
                + Template for list errors.
                + cf : + + https://bcit-ci.github.io/CodeIgniter4/libraries/validation.html#customizing-error-display +
              • - error_start_delimiter Default is '<p>'
                - Starting delimiter for errors. + templates['messages']['list'] Default is 'IonAuth\Views\Messages\list'
                + Template for list messages.
              • - error_end_delimiter Default is '</p>'
                - Ending delimiter for errors. + templates['messages']['single'] Default is 'IonAuth\Views\Messages\single'
                + Template for single message.
              • -
              +

            @@ -432,7 +426,7 @@

            login()

            1. 'Identity' - string REQUIRED. Username, email or any unique value in your users table, depending on your configuration.
            2. 'Password' - string REQUIRED.
            3. -
            4. 'Remember' - boolean OPTIONAL. TRUE sets the user to be remembered if enabled in the configuration.
            5. +
            6. 'Remember' - boolean OPTIONAL. true sets the user to be remembered if enabled in the configuration.

            Return

            @@ -445,7 +439,7 @@

            login()

            $identity = 'ben.edmunds@gmail.com'; $password = '12345678'; $remember = TRUE; // remember the user - $this->ion_auth->login($identity, $password, $remember); + $this->ionAuth->login($identity, $password, $remember);
            @@ -455,7 +449,7 @@

            logout()

            Usage

            -		$this->ion_auth->logout();
            +		$this->ionAuth->logout();
             	

            @@ -488,13 +482,13 @@

            register()

            ); $group = array('1'); // Sets user to admin. - $this->ion_auth->register($username, $password, $email, $additional_data, $group) + $this->ionAuth->register($username, $password, $email, $additional_data, $group)
            - -

            create_user()

            -

            create_user is an alternate method for register() method.

            + +

            createUser()

            +

            createUser is an alternate method for register() method.


            @@ -520,17 +514,17 @@

            update()

            'last_name' => 'Edmunds', 'password' => '123456789', ); - $this->ion_auth->update($id, $data) + $this->ionAuth->update($id, $data)
            - -

            update_user()

            -

            update_user() is an alternate method for update() method.

            + +

            updateUser()

            +

            updateUser() is an alternate method for update() method.


            - -

            delete_user()

            + +

            deleteUser()

            Delete a user.

            Parameters

            @@ -546,12 +540,12 @@

            delete_user()

            Usage

             		$id = 12;
            -		$this->ion_auth->delete_user($id)
            +		$this->ionAuth->deleteUser($id)
             	

            -

            forgotten_password()

            +

            forgottenPassword()

            Resets a users password by emailing the user a reset code.

            Parameters

            @@ -570,35 +564,35 @@

            forgotten_password()

            //Working code for this example is in the example Auth controller in the github repo function forgot_password() { - $this->form_validation->set_rules('email', 'Email Address', 'required'); - if ($this->form_validation->run() == false) { + $this->validation->setRule('email', 'Email Address', 'required'); + if ($this->validation->run() == false) { //setup the input $this->data['email'] = array('name' => 'email', 'id' => 'email', ); //set any errors and display the form - $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message'); - $this->load->view('auth/forgot_password', $this->data); + $this->data['message'] = ($this->validation->listErrors()) ? $this->validation->listErrors() : $this->session->flashdata('message'); + return view('auth/forgot_password', $this->data); } else { //run the forgotten password method to email an activation code to the user - $forgotten = $this->ion_auth->forgotten_password($this->input->post('email')); + $forgotten = $this->ionAuth->forgottenPassword($this->request->getPost('email')); if ($forgotten) { //if there were no errors - $this->session->set_flashdata('message', $this->ion_auth->messages()); - redirect("auth/login", 'refresh'); //we should display a confirmation page here instead of the login page + $this->session->setFlashdata('message', $this->ionAuth->messages()); + return redirect("auth/login"); //we should display a confirmation page here instead of the login page } else { - $this->session->set_flashdata('message', $this->ion_auth->errors()); - redirect("auth/forgot_password", 'refresh'); + $this->session->setFlashdata('message', $this->ionAuth->errors()); + return redirect("auth/forgot_password"); } } }
            - -

            forgotten_password_check()

            + +

            forgottenPasswordCheck()

            Check to see if the forgotten password code is valid.

            Parameters

            @@ -613,7 +607,7 @@

            forgotten_password_check()

            Usage

            -		$user = $this->ion_auth->forgotten_password_check($code);
            +		$user = $this->ionAuth->forgottenPasswordCheck($code);
             		if ($user)
             		{
             			//display the password reset form
            @@ -621,8 +615,8 @@ 

            forgotten_password_check()


            - -

            logged_in()

            + +

            loggedIn()

            Check to see if a user is logged in.

            Return

            @@ -632,15 +626,15 @@

            logged_in()

            Usage

            -		if (!$this->ion_auth->logged_in())
            +		if (!$this->ionAuth->loggedIn())
             		{
            -			redirect('auth/login');
            +			return redirect('auth/login');
             		}
             	

            - -

            is_admin()

            + +

            isAdmin()

            Check to see if the currently logged in user is an admin.

            @@ -656,7 +650,7 @@

            is_admin()

            Usage

            -		if (!$this->ion_auth->is_admin())
            +		if (!$this->ionAuth->isAdmin())
             		{
             			$this->session->set_flashdata('message', 'You must be an admin to view this page');
             			redirect('welcome/index');
            @@ -664,8 +658,8 @@ 

            is_admin()


            - -

            in_group()

            + +

            inGroup()

            Check to see if a user is in a group(s).

            Parameters

            @@ -684,7 +678,7 @@

            in_group()

             		# single group (by name)
             		$group = 'gangstas';
            -		if (!$this->ion_auth->in_group($group))
            +		if (!$this->ionAuth->inGroup($group))
             		{
             			$this->session->set_flashdata('message', 'You must be a gangsta to view this page');
             			redirect('welcome/index');
            @@ -692,7 +686,7 @@ 

            in_group()

            # single group (by id) $group = 1; - if (!$this->ion_auth->in_group($group)) + if (!$this->ionAuth->inGroup($group)) { $this->session->set_flashdata('message', 'You must be part of the group 1 to view this page'); redirect('welcome/index'); @@ -700,28 +694,28 @@

            in_group()

            # multiple groups (by name) $group = array('gangstas', 'hoodrats'); - if (!$this->ion_auth->in_group($group)) + if (!$this->ionAuth->inGroup($group)) $this->session->set_flashdata('message', 'You must be a gangsta OR a hoodrat to view this page'); redirect('welcome/index'); } # multiple groups (by id) $group = array(1, 2); - if (!$this->ion_auth->in_group($group)) + if (!$this->ionAuth->inGroup($group)) $this->session->set_flashdata('message', 'You must be a part of group 1 or 2 to view this page'); redirect('welcome/index'); } # multiple groups (by id and name) $group = array('gangstas', 2); - if (!$this->ion_auth->in_group($group)) + if (!$this->ionAuth->inGroup($group)) $this->session->set_flashdata('message', 'You must be a part of the gangstas or group 2'); redirect('welcome/index'); } # multiple groups (by id) and check if all exist $group = array(1, 2); - if (!$this->ion_auth->in_group($group, false, true)) + if (!$this->ionAuth->inGroup($group, false, true)) $this->session->set_flashdata('message', 'You must be a part of group 1 and 2 to view this page'); redirect('welcome/index'); } @@ -729,8 +723,8 @@

            in_group()


            - -

            username_check()

            + +

            usernameCheck()

            Check to see if the username is already registered.

            Parameters

            @@ -753,16 +747,16 @@

            username_check()

            'first_name' => $this->input->post('first_name'), 'last_name' => $this->input->post('last_name'), ); - if (!$this->ion_auth->username_check($username)) + if (!$this->ionAuth->usernameCheck($username)) { $group_name = 'users'; - $this->ion_auth->register($username, $password, $email, $additional_data, $group_name) + $this->ionAuth->register($username, $password, $email, $additional_data, $group_name) }
            - -

            email_check()

            + +

            emailCheck()

            Check to see if the email is already registered.

            Parameters

            @@ -785,16 +779,16 @@

            email_check()

            'first_name' => $this->input->post('first_name'), 'last_name' => $this->input->post('last_name'), ); - if (!$this->ion_auth->email_check($email)) + if (!$this->ionAuth->emailCheck($email)) { $group_name = 'users'; - $this->ion_auth->register($username, $password, $email, $additional_data, $group_name) + $this->ionAuth->register($username, $password, $email, $additional_data, $group_name) }
            - -

            identity_check()

            + +

            identityCheck()

            Check to see if the identity is already registered.

            Parameters

            @@ -810,21 +804,21 @@

            identity_check()

            Usage

             		//This is a lame example but it works.
            -		$user = $this->ion_auth->user();
            +		$user = $this->ionAuth->user();
             		$data = array(
             					'identity' => $this->input->post('identity'),
             					'first_name' => $this->input->post('first_name'),
             					'last_name' => $this->input->post('last_name'),
             					 );
            -		if ($data['identity'] === $user->username || $data['identity'] === $user->email || $this->ion_auth->identity_check($data['identity']) === FALSE)
            +		if ($data['identity'] === $user->username || $data['identity'] === $user->email || $this->ionAuth->identityCheck($data['identity']) === FALSE)
             		{
            -			$this->ion_auth->update_user($user->id, $data)
            +			$this->ionAuth->updateUser($user->id, $data)
             		}
             	

            - -

            is_max_login_attempts_exceeded()

            + +

            isMaxLoginAttemptsExceeded()

            If login attempt tracking is enabled, checks to see if the number of failed login attempts for this identity or ip address has been exceeded. The controller must call this method and take any necessary actions. Login attempt limits are not enforced in the library.

            @@ -835,13 +829,13 @@

            is_max_login_attempts_exceeded()

            Return

              -
            • boolean. TRUE if maximum_login_attempts is exceeded FALSE if not or if login attempts not tracked.
            • +
            • boolean. TRUE if maximumLoginAttempts is exceeded FALSE if not or if login attempts not tracked.

            Usage

             		$identity = 'ben.edmunds@gmail.com';
            -		if ($this->ion_auth->is_max_login_attempts_exceeded($identity))
            +		if ($this->ionAuth->isMaxLoginAttemptsExceeded($identity))
             		{
             			$this->session->set_flashdata('message', 'You have too many login attempts');
             			redirect('welcome/index');
            @@ -849,8 +843,8 @@ 

            is_max_login_attempts_exceeded()


            - -

            get_attempts_num()

            + +

            getAttemptsNum()

            Returns the number of failed login attempts for this identity or ip address.

            Parameters

            @@ -866,12 +860,12 @@

            get_attempts_num()

            Usage

             		$identity = 'ben.edmunds@gmail.com';
            -		$num_attempts = $this->ion_auth->get_attempts_num($identity);
            +		$num_attempts = $this->ionAuth->getAttemptsNum($identity);
             	

            - -

            increase_login_attempts()

            + +

            increaseLoginAttempts()

            If login attempt tracking is enabled, records another failed login attempt for this identity or ip address. This method is automatically called during the login() method if the login failed.

            @@ -884,14 +878,14 @@

            increase_login_attempts()

             		$identity = 'ben.edmunds@gmail.com';
             		$password = '12345678';
            -		if ($this->ion_auth->login($identity, $password) == FALSE) {
            -			$this->ion_auth->increase_login_attempts($identity)
            +		if ($this->ionAuth->login($identity, $password) == FALSE) {
            +			$this->ionAuth->increaseLoginAttempts($identity)
             		}
             	

            - -

            clear_login_attempts()

            + +

            clearLoginAttempts()

            Clears all failed login attempt records for this identity or this ip address. This method is automatically called during the login() method if the login succeded.

            @@ -904,8 +898,8 @@

            clear_login_attempts()

             		$identity = 'ben.edmunds@gmail.com';
             		$password = '12345678';
            -		if ($this->ion_auth->login($identity, $password) == TRUE) {
            -			$this->ion_auth->clear_login_attempts($identity)
            +		if ($this->ionAuth->login($identity, $password) == TRUE) {
            +			$this->ionAuth->clearLoginAttempts($identity)
             		}
             	

            @@ -946,7 +940,7 @@

            user()

            Usage

            -		$user = $this->ion_auth->user()->row();
            +		$user = $this->ionAuth->user()->row();
             		echo $user->email;
             	

            @@ -968,41 +962,41 @@

            users()

            Usage

            -		$users = $this->ion_auth->users()->result(); // get all users
            +		$users = $this->ionAuth->users()->result(); // get all users
              	

            -		$users = $this->ion_auth->users(1)->result(); // get users from group with id of '1'
            +		$users = $this->ionAuth->users(1)->result(); // get users from group with id of '1'
             	

            -		$users = $this->ion_auth->users('members)->result(); // get users from 'members' group
            +		$users = $this->ionAuth->users('members)->result(); // get users from 'members' group
             	

            -		$users = $this->ion_auth->users(array('admin','members'))->result(); // get users from 'admin' and 'members' group
            +		$users = $this->ionAuth->users(array('admin','members'))->result(); // get users from 'admin' and 'members' group
             	

            -		$users = $this->ion_auth->users(array('admin',4,'members'))->result(); // get users from 'admin' group, 'members' group and group with id '4'
            +		$users = $this->ionAuth->users(array('admin',4,'members'))->result(); // get users from 'admin' group, 'members' group and group with id '4'
             	

            -		$users = $this->ion_auth->users(1)->result(); // get users from group with id of '1'
            +		$users = $this->ionAuth->users(1)->result(); // get users from group with id of '1'
             	

            -		$users = $this->ion_auth->users('members)->result(); // get users from 'members' group
            +		$users = $this->ionAuth->users('members)->result(); // get users from 'members' group
             	

            -		$users = $this->ion_auth->users(array('admin','members'))->result(); // get users from 'admin' and 'members' group
            +		$users = $this->ionAuth->users(array('admin','members'))->result(); // get users from 'admin' and 'members' group
             	

            -		$users = $this->ion_auth->users(array('admin',4,'members'))->result(); // get users from 'admin' group, 'members' group and group with id '4'
            +		$users = $this->ionAuth->users(array('admin',4,'members'))->result(); // get users from 'admin' group, 'members' group and group with id '4'
             	
            @@ -1022,7 +1016,7 @@

            group()

            Usage

             		$group_id = 2;
            -		$group = $this->ion_auth->group($group_id)->result();
            +		$group = $this->ionAuth->group($group_id)->result();
             	

            @@ -1037,7 +1031,7 @@

            groups()

            Usage

            -		$groups = $this->ion_auth->groups()->result();
            +		$groups = $this->ionAuth->groups()->result();
             	

            @@ -1057,21 +1051,21 @@

            messages()

            'first_name' => 'Ben', 'last_name' => 'Edmunds', ); - if ($this->ion_auth->update_user($id, $data)) + if ($this->ionAuth->updateUser($id, $data)) { - $messages = $this->ion_auth->messages(); + $messages = $this->ionAuth->messages(); echo $messages; } else { - $errors = $this->ion_auth->errors(); + $errors = $this->ionAuth->errors(); echo $errors; }
            - -

            messages_array()

            + +

            messagesArray()

            Get messages as an array.

            Return

            @@ -1091,9 +1085,9 @@

            messages_array()

            'first_name' => 'Ben', 'last_name' => 'Edmunds', ); - if ($this->ion_auth->update_user($id, $data)) + if ($this->ionAuth->updateUser($id, $data)) { - $messages = $this->ion_auth->messages_array(); + $messages = $this->ionAuth->messagesArray(); foreach ($messages as $message) { echo $message; @@ -1101,7 +1095,7 @@

            messages_array()

            } else { - $errors = $this->ion_auth->errors_array(); + $errors = $this->ionAuth->errorsArray(); foreach ($errors as $error) { echo $error; @@ -1110,8 +1104,8 @@

            messages_array()


            - -

            get_users_groups()

            + +

            getUsersGroups()

            Get all groups a user is part of.

            Parameters

            @@ -1134,12 +1128,12 @@

            get_users_groups()

            Usage

            -		$user_groups = $this->ion_auth->get_users_groups($user->id)->result();
            +		$user_groups = $this->ionAuth->getUsersGroups($user->id)->result();
             	

            - -

            add_to_group()

            + +

            addToGroup()

            Add user to group

            Parameters

            @@ -1156,15 +1150,15 @@

            add_to_group()

            Usage

                     // pass an array of group ID's and user ID
            -        $this->ion_auth->add_to_group(array('1', '3', '6'), $user_id);
            +        $this->ionAuth->addToGroup(array('1', '3', '6'), $user_id);
             
                     // pass a single ID and user ID
            -        $this->ion_auth->add_to_group(1, $user_id);
            +        $this->ionAuth->addToGroup(1, $user_id);
             	

            - -

            remove_from_group()

            + +

            removeFromGroup()

            Remove user from group(s)

            Parameters

            @@ -1181,50 +1175,50 @@

            remove_from_group()

            Usage

                     // pass an array of group ID's and user ID
            -        $this->ion_auth->remove_from_group(array('1', '3', '6'), $user_id);
            +        $this->ionAuth->removeFromGroup(array('1', '3', '6'), $user_id);
             
                     // pass a single ID and user ID
            -        $this->ion_auth->remove_from_group(1, $user_id);
            +        $this->ionAuth->removeFromGroup(1, $user_id);
             
                     // pass NULL to remove user from all groups
            -        $this->ion_auth->remove_from_group(NULL, $user_id);
            +        $this->ionAuth->removeFromGroup(NULL, $user_id);
             	

            - -

            create_group()

            + +

            createGroup()

            Create a group

            Parameters

              -
            1. 'group_name' - string REQUIRED.
            2. -
            3. 'group_description' - string.
            4. +
            5. 'groupName' - string REQUIRED.
            6. +
            7. 'groupDescription' - string.

            Return

              -
            • brand new group_id if the group was created, FALSE if the group creation failed.
            • +
            • brand new group_id if the group was created, false if the group creation failed.

            Usage

                     // pass the right arguments and it's done
            -        $group = $this->ion_auth->create_group('new_test_group', 'This is a test description');
            +        $group = $this->ionAuth->createGroup('new_test_group', 'This is a test description');
             
            -        if(!$group)
            +        if (! $group)
                     {
            -        	$view_errors = $this->ion_auth->messages();
            +        	$viewErrors = $this->ionAuth->messages();
                   	}
                   	else
                   	{
            -      		$new_group_id = $group;
            +      		$newGroupId = $group;
                   		// do more cool stuff
                   	}
             	

            - -

            update_group()

            + +

            updateGroup()

            Update details of a group

            Parameters

            @@ -1241,17 +1235,17 @@

            update_group()

            Usage

            -				// source these things from anywhere you like (eg., a form)
            -				$group_id = 2;
            -				$group_name = 'test_group_changed_name';
            -				$group_description = 'I changed the name yay';
            +		// source these things from anywhere you like (eg., a form)
            +		$group_id = 2;
            +		$group_name = 'test_group_changed_name';
            +		$group_description = 'I changed the name yay';
             
                     // pass the right arguments and it's done
            -        $group_update = $this->ion_auth->update_group($group_id, $group_name, $group_description);
            +        $group_update = $this->ionAuth->updateGroup($group_id, $group_name, $group_description);
             
                     if(!$group_update)
                     {
            -        	$view_errors = $this->ion_auth->messages();
            +        	$view_errors = $this->ionAuth->messages();
                   	}
                   	else
                   	{
            @@ -1260,8 +1254,8 @@ 

            update_group()


            - -

            delete_group()

            + +

            deleteGroup()

            Remove a group. Removes the group details from the configured 'groups' table. Users belonging to the group are stripped of this status (references to this group are removed from users_groups), but user data itself remains untouched.

            Parameters

            @@ -1271,20 +1265,20 @@

            delete_group()

            Return

              -
            • boolean. TRUE if the group was deleted, FALSE if the delete failed.
            • +
            • boolean. true if the group was deleted, false if the delete failed.

            Usage

            -				// source this from anywhere you like (eg., a form)
            -				$group_id = 2;
            +		// source this from anywhere you like (eg., a form)
            +		$groupId = 2;
             
                     // pass the right arguments and it's done
            -        $group_delete = $this->ion_auth->delete_group($group_id);
            +        $groupDelete = $this->ionAuth->deleteGroup($groupId);
             
            -        if(!$group_delete)
            +        if (! $groupDelete)
                     {
            -        	$view_errors = $this->ion_auth->messages();
            +        	$viewErrors = $this->ionAuth->messages();
                   	}
                   	else
                   	{
            @@ -1294,14 +1288,14 @@ 

            delete_group()


            - -

            set_message_delimiters()

            -

            Set the message delimiters.

            + +

            setMessageTemplate()

            +

            Set the message templates.

            Parameters

              -
            1. 'Start Delimiter' - string REQUIRED.
            2. -
            3. 'End Delimiter' - string REQUIRED.
            4. +
            5. 'Single template' - string OPTIONAL.
            6. +
            7. 'List template' - string OPTIONAL.

            Usage

            @@ -1311,16 +1305,15 @@

            set_message_delimiters()

            'first_name' => 'Ben', 'last_name' => 'Edmunds', ); - if ($this->ion_auth->update_user($id, $data)) + if ($this->ionAuth->updateUser($id, $data)) { - $this->ion_auth->set_message_delimiters('<p><strong>','</strong></p>'); - $messages = $this->ion_auth->messages(); + $this->ionAuth->setMessageTemplate('', 'list_message'); + $messages = $this->ionAuth->messages(); echo $messages; } else { - $this->ion_auth->set_error_delimiters('<p><strong>','</strong></p>'); - $errors = $this->ion_auth->errors(); + $errors = $this->ionAuth->errors(); echo $errors; }
            @@ -1342,21 +1335,21 @@

            errors()

            'first_name' => 'Ben', 'last_name' => 'Edmunds', ); - if ($this->ion_auth->update_user($id, $data)) + if ($this->ionAuth->updateUser($id, $data)) { - $messages = $this->ion_auth->messages(); + $messages = $this->ionAuth->messages(); echo $messages; } else { - $errors = $this->ion_auth->errors(); + $errors = $this->ionAuth->errors(); echo $errors; }
            - -

            errors_array()

            + +

            errorsArray()

            Get error messages as an array.

            Return

            @@ -1376,9 +1369,9 @@

            errors_array()

            'first_name' => 'Ben', 'last_name' => 'Edmunds', ); - if ($this->ion_auth->update_user($id, $data)) + if ($this->ionAuth->updateUser($id, $data)) { - $messages = $this->ion_auth->messages_array(); + $messages = $this->ionAuth->messagesArray(); foreach ($messages as $message) { echo $message; @@ -1386,7 +1379,7 @@

            errors_array()

            } else { - $errors = $this->ion_auth->errors_array(); + $errors = $this->ionAuth->errorsArray(); foreach ($errors as $error) { echo $error; @@ -1395,42 +1388,10 @@

            errors_array()


            - -

            set_error_delimiters()

            -

            Set the error delimiters.

            - -

            Parameters

            -
              -
            1. 'Start Delimiter' - string REQUIRED.
            2. -
            3. 'End Delimiter' - string REQUIRED.
            4. -
            - -

            Usage

            -
            -		$id = 12;
            -		$data = array(
            -					'first_name' => 'Ben',
            -					'last_name' => 'Edmunds',
            -					 );
            -		if ($this->ion_auth->update_user($id, $data))
            -		{
            -			$this->ion_auth->set_message_delimiters('<p><strong>','</strong></p>');
            -			$messages = $this->ion_auth->messages();
            -			echo $messages;
            -		}
            -		else
            -		{
            -			$this->ion_auth->set_error_delimiters('<p><strong>','</strong></p>');
            -			$errors = $this->ion_auth->errors();
            -			echo $errors;
            -		}
            -	
            -
            - - -

            set_hook()

            + +

            setHook()

            - Set a single or multiple functions to be called when trigged by trigger_events(). + Set a single or multiple functions to be called when trigged by triggerEvents(). See an example here: https://gist.github.com/657de89b26decda2b2fa

            @@ -1454,7 +1415,7 @@

            set_hook()

            /* make sure we loaded ion_auth2 The following does not need to go in __construct() it just needs to be set before - you trigger_events(). + you triggerEvents(). */ $event = 'socialpush'; $class = 'Accounts'; @@ -1462,24 +1423,24 @@

            set_hook()

            $name = 'activate_sendmail'; $method = 'email'; - $this->ion_auth->set_hook($event, $name, $class, $method, $args); + $this->ionAuth->setHook($event, $name, $class, $method, $args); $name = 'call_Twitter'; $method = 'twitter'; - $this->ion_auth->set_hook($event, $name, $class, $method, $args); + $this->ionAuth->setHook($event, $name, $class, $method, $args); $name = 'call_MailChimp_API'; $method = 'mailchimp'; - $this->ion_auth->set_hook($event, $name, $class, $method, $args); + $this->ionAuth->setHook($event, $name, $class, $method, $args); $name = 'call_Facebook_API'; $method = 'facebook'; - $this->ion_auth->set_hook($event, $name, $class, $method, $args); + $this->ionAuth->setHook($event, $name, $class, $method, $args); $name = 'call_gPlus_API'; $method = 'gplus'; - $this->ion_auth->set_hook($event, $name, $class, $method, $args); + $this->ionAuth->setHook($event, $name, $class, $method, $args); } public function Post_Message($one) { - $this->ion_auth->trigger_events('socialpush'); + $this->ionAuth->triggerEvents('socialpush'); } public function email($content, $who) { @@ -1507,9 +1468,9 @@

            set_hook()

            - -

            trigger_events()

            -

            Call Additional functions to run that were registered with set_hook().

            + +

            triggerEvents()

            +

            Call Additional functions to run that were registered with setHook().

            Parameters

              @@ -1518,7 +1479,7 @@

              trigger_events()

              Usage

              -	 $this->ion_auth->trigger_events('socialpush');
              +	 $this->ionAuth->triggerEvents('socialpush');
               	

              diff --git a/views/auth/change_password.php b/views/auth/change_password.php deleted file mode 100644 index f8ce60b65..000000000 --- a/views/auth/change_password.php +++ /dev/null @@ -1,25 +0,0 @@ -

              - -
              - - - -

              -
              - -

              - -

              -
              - -

              - -

              -
              - -

              - - -

              - - diff --git a/views/auth/create_group.php b/views/auth/create_group.php deleted file mode 100644 index 86b07e93a..000000000 --- a/views/auth/create_group.php +++ /dev/null @@ -1,20 +0,0 @@ -

              -

              - -
              - - - -

              -
              - -

              - -

              -
              - -

              - -

              - - \ No newline at end of file diff --git a/views/auth/create_user.php b/views/auth/create_user.php deleted file mode 100644 index b292d7b4c..000000000 --- a/views/auth/create_user.php +++ /dev/null @@ -1,57 +0,0 @@ -

              -

              - -
              - - - -

              -
              - -

              - -

              -
              - -

              - - '; - echo lang('create_user_identity_label', 'identity'); - echo '
              '; - echo form_error('identity'); - echo form_input($identity); - echo '

              '; - } - ?> - -

              -
              - -

              - -

              -
              - -

              - -

              -
              - -

              - -

              -
              - -

              - -

              -
              - -

              - - -

              - - diff --git a/views/auth/deactivate_user.php b/views/auth/deactivate_user.php deleted file mode 100755 index 93756db8b..000000000 --- a/views/auth/deactivate_user.php +++ /dev/null @@ -1,18 +0,0 @@ -

              -

              username);?>

              - -id);?> - -

              - - - - -

              - - - $user->id]); ?> - -

              - - \ No newline at end of file diff --git a/views/auth/edit_group.php b/views/auth/edit_group.php deleted file mode 100644 index 080dad7a0..000000000 --- a/views/auth/edit_group.php +++ /dev/null @@ -1,20 +0,0 @@ -

              -

              - -
              - - - -

              -
              - -

              - -

              -
              - -

              - -

              - - \ No newline at end of file diff --git a/views/auth/email/activate.tpl.php b/views/auth/email/activate.tpl.php deleted file mode 100644 index e2436cf71..000000000 --- a/views/auth/email/activate.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ - - -

              -

              - - \ No newline at end of file diff --git a/views/auth/email/forgot_password.tpl.php b/views/auth/email/forgot_password.tpl.php deleted file mode 100644 index 2cc5b02fb..000000000 --- a/views/auth/email/forgot_password.tpl.php +++ /dev/null @@ -1,6 +0,0 @@ - - -

              -

              - - \ No newline at end of file diff --git a/views/auth/forgot_password.php b/views/auth/forgot_password.php deleted file mode 100644 index 1eb2bde17..000000000 --- a/views/auth/forgot_password.php +++ /dev/null @@ -1,15 +0,0 @@ -

              -

              - -
              - - - -

              -
              - -

              - -

              - - diff --git a/views/auth/index.php b/views/auth/index.php deleted file mode 100755 index d95764477..000000000 --- a/views/auth/index.php +++ /dev/null @@ -1,31 +0,0 @@ -

              -

              - -
              - - - - - - - - - - - - - - - - - - - - -
              first_name,ENT_QUOTES,'UTF-8');?>last_name,ENT_QUOTES,'UTF-8');?>email,ENT_QUOTES,'UTF-8');?> - groups as $group):?> - id, htmlspecialchars($group->name,ENT_QUOTES,'UTF-8')) ;?>
              - -
              active) ? anchor("auth/deactivate/".$user->id, lang('index_active_link')) : anchor("auth/activate/". $user->id, lang('index_inactive_link'));?>id, 'Edit') ;?>
              - -

              |

              \ No newline at end of file diff --git a/views/auth/login.php b/views/auth/login.php deleted file mode 100644 index 58ff16d6e..000000000 --- a/views/auth/login.php +++ /dev/null @@ -1,28 +0,0 @@ -

              -

              - -
              - - - -

              - - -

              - -

              - - -

              - -

              - - -

              - - -

              - - - -

              \ No newline at end of file diff --git a/views/auth/reset_password.php b/views/auth/reset_password.php deleted file mode 100644 index 710170484..000000000 --- a/views/auth/reset_password.php +++ /dev/null @@ -1,22 +0,0 @@ -

              - -
              - - - -

              -
              - -

              - -

              -
              - -

              - - - - -

              - - \ No newline at end of file