- trim() $fUsername - MySQL thinks "foo" == "foo " (and therefore allows
login as "foo@example.com " - but later we'll get funny "undefined index"
problems in PFAHander->view()) when an admin wants to change the password
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1665 a1433add-5e2c-0410-b055-b7f2511e0802
- require token for CSRF protection, see
https://sourceforge.net/p/postfixadmin/bugs/269/
login.php, users/login.php:
- create token and store it in $_SESSION
templates/*:
- add token to all delete.php links
templates/list-virtual_alias_domain.tpl:
- change delete confirmation dialog to contain "from->target"
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1564 a1433add-5e2c-0410-b055-b7f2511e0802
- make login() a non-static function
- login: use $this->db_table and $this->id_field instead of hardcoded names
users/login.php, xmlrpc.php:
- adopt to now non-static MailboxHandler->login()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1484 a1433add-5e2c-0410-b055-b7f2511e0802
login.php, users/login.php:
- set logintype=admin/user smarty variable
- cleanup: move smarty assignments outside of GET/POST handling - it's
the same for both
users/login.php:
- do not pre-fill username on failed login
templates/login.tpl:
- merge in users_login.tpl
- add some {if} to handle the differences between admin and user login
templates/users_login.tpl:
- deleted
*.lang:
- mark pUsersLogin_username, pUsersLogin_password, pUsersLogin_language
and pUsersLogin_button as obsolete
- add some notes if pLogin_* and pUsersLogin differ
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1137 a1433add-5e2c-0410-b055-b7f2511e0802
- replaced tMessage with flash_error() / flash_info()
users/vacation.php:
- set today as default date if vacation start/end date are empty
users/edit-alias.php:
- removed now superfluous code to join multiple tMessage texts with <br>
- removed a </font> that was appended to $PALANG['pEdit_alias_goto_text_error2']
This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1085 a1433add-5e2c-0410-b055-b7f2511e0802
(as discussed with GingerDog on IRC yesterday).
Also renamed user to mailbox in the CLI.
- renamed model/UserHandler.php to MailboxHandler.php
- renamed scripts/shells/user.php to mailbox.php
- replaced UserHandler / user with MailboxHandler / mailbox in various files
- unrelated cleanup: deleted obsolete scripts/models-ext directory
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1019 a1433add-5e2c-0410-b055-b7f2511e0802
functions.inc.php:
- function check_language
- new optional parameter $use_post (needed by login.php)
- check for language cookie
- check for $_POST['lang']
- removed substr() call because it made pt-br translation unuseable
- new function language_selector
- returns a HTML dropdown language selector
- new function safecookie
- similar to safeget, but for cookies
templates/login.php, templates/users_login.php:
- display language selector dropdown
login.php, users/login.php:
- check for selected language
- set cookie if user selected non-default language
languages/language.php: (NEW FILE)
- list of supported languages
- language names taken from phpMyAdmin login form
common.php:
- include languages/language.php
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@280 a1433add-5e2c-0410-b055-b7f2511e0802