Changeset 462 for trunk/services/login.php
- Timestamp:
- Feb 7, 2014 7:17:49 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/login.php
r396 r462 4 4 * For details visit the project site: <http://trac.strangecode.com/codebase/> 5 5 * Copyright 2001-2012 Strangecode, LLC 6 * 6 * 7 7 * This file is part of The Strangecode Codebase. 8 8 * … … 11 11 * Free Software Foundation, either version 3 of the License, or (at your option) 12 12 * any later version. 13 * 13 * 14 14 * The Strangecode Codebase is distributed in the hope that it will be useful, but 15 15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 16 16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 17 * details. 18 * 18 * 19 19 * You should have received a copy of the GNU General Public License along with 20 20 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 32 32 $app->sslOn(); 33 33 34 $frm['username'] = getFormdata('username'); 34 require_once 'codebase/lib/Prefs.inc.php'; 35 $login_prefs = new Prefs('login'); 36 $login_prefs->setDefaults(array('username' => '')); 37 38 if ('' != $login_prefs->get('username')) { 39 $frm['remember_me'] = '1'; 40 } 41 42 $frm['username'] = getFormdata('username', $login_prefs->get('username')); 35 43 $frm['password'] = getFormdata('password'); 36 44 … … 39 47 40 48 if ($auth->login($frm['username'], $frm['password'])) { 49 if (getFormData('remember_me')) { 50 $login_prefs->set('username', getFormData('username')); 51 } else { 52 $login_prefs->set('username', ''); 53 } 41 54 $app->raiseMsg(_("You are now logged in."), MSG_SUCCESS, __FILE__, __LINE__); 42 55 $app->dieBoomerangURL('login');
Note: See TracChangeset
for help on using the changeset viewer.