Changeset 147
- Timestamp:
- Jun 5, 2006 1:31:25 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/sql.cli.php
r136 r147 76 76 } else if ('added_by_user_id' == $field || 'modified_by_user_id' == $field) { 77 77 // Toggle types. 78 $c[$field] = "'\" . \$db->escapeString(\$auth->get Val('user_id')) . \"'";78 $c[$field] = "'\" . \$db->escapeString(\$auth->get('user_id')) . \"'"; 79 79 } else if ('added_datetime' == $field || 'modified_datetime' == $field) { 80 80 // DB record insertion datetime. -
trunk/lib/Prefs.inc.php
r146 r147 22 22 23 23 // Name of database table to store prefs. 24 'db_table' => 'pref s_tbl',24 'db_table' => 'pref_tbl', 25 25 26 26 // Automatically create table and verify columns. Better set to false after site launch. … … 207 207 208 208 // Skip this method if not using the db. 209 if (true !== =$this->getParam('enable_db')) {209 if (true !== $this->getParam('enable_db')) { 210 210 return true; 211 211 } … … 271 271 272 272 // Skip this method if not using the db. 273 if (true !== =$this->getParam('enable_db')) {273 if (true !== $this->getParam('enable_db')) { 274 274 return true; 275 275 } -
trunk/services/admins.php
r143 r147 202 202 } 203 203 204 if (getFormData('user_type') == 'root' && 'root' != $auth->get Val('user_type')) {204 if (getFormData('user_type') == 'root' && 'root' != $auth->get('user_type')) { 205 205 $fv->addError('user_type', sprintf(_("You do not have clearance to create a user with root privileges."), null)); 206 206 } … … 343 343 $qid = $db->query("SELECT COUNT(*) from admin_tbl"); 344 344 list($num_admins) = mysql_fetch_row($qid); 345 if ('root' == $user_type && 'root' != $auth->get Val('user_type')) {345 if ('root' == $user_type && 'root' != $auth->get('user_type')) { 346 346 // Only root users can delete root users! 347 347 $app->raiseMsg(_("You do not have clearance to delete a root administrator."), MSG_NOTICE, __FILE__, __LINE__); … … 349 349 // There must always be at least one admnistrator! 350 350 $app->raiseMsg(_("You cannot delete the only administrator in the database. There must be at least one to log in and create other users."), MSG_NOTICE, __FILE__, __LINE__); 351 } else if ($auth->get Val('user_id') == $id) {351 } else if ($auth->get('user_id') == $id) { 352 352 // Do not delete yourself! 353 353 $app->raiseMsg(_("You cannot delete yourself."), MSG_NOTICE, __FILE__, __LINE__); … … 388 388 '" . $db->escapeString($frm['email']) . "', 389 389 '" . $db->escapeString($frm['user_type']) . "', 390 '" . $db->escapeString($auth->get Val('user_id')) . "',390 '" . $db->escapeString($auth->get('user_id')) . "', 391 391 NOW() 392 392 ) … … 435 435 email = '" . $db->escapeString($frm['email']) . "', 436 436 user_type = '" . $db->escapeString($frm['user_type']) . "', 437 modified_by_user_id = '" . $db->escapeString($auth->get Val('user_id')) . "',437 modified_by_user_id = '" . $db->escapeString($auth->get('user_id')) . "', 438 438 modified_datetime = NOW() 439 439 WHERE admin_id = '" . $db->escapeString($frm['admin_id']) . "' -
trunk/services/login.php
r136 r147 21 21 $app->raiseMsg(_("You are now logged in."), MSG_SUCCESS, __FILE__, __LINE__); 22 22 $app->dieBoomerangURL('login'); 23 $app->logMsg(sprintf('%s %s successfully logged-in.', $auth->get Val('auth_name'), $frm['username']), LOG_INFO, __FILE__, __LINE__);23 $app->logMsg(sprintf('%s %s successfully logged-in.', $auth->get('auth_name'), $frm['username']), LOG_INFO, __FILE__, __LINE__); 24 24 } else { 25 25 $app->raiseMsg(_("Login failed, please try again."), MSG_NOTICE, __FILE__, __LINE__); 26 $app->logMsg(sprintf('%s %s failed login using (MD5ed) password: %s', ucfirst($auth->get Val('auth_name')), $frm['username'], md5($frm['password'])), LOG_NOTICE, __FILE__, __LINE__);26 $app->logMsg(sprintf('%s %s failed login using (MD5ed) password: %s', ucfirst($auth->get('auth_name')), $frm['username'], md5($frm['password'])), LOG_NOTICE, __FILE__, __LINE__); 27 27 } 28 28 } -
trunk/services/logout.php
r137 r147 9 9 require_once 'codebase/lib/Lock.inc.php'; 10 10 $lock =& Lock::getInstance($auth); 11 $lock->removeAll($auth->get Val('user_id'));11 $lock->removeAll($auth->get('user_id')); 12 12 } 13 13 -
trunk/services/password.php
r143 r147 48 48 } 49 49 50 if (!$fv->anyErrors() && false === $auth->authenticate($auth->get Val('username'), $frm['oldpassword'])) {50 if (!$fv->anyErrors() && false === $auth->authenticate($auth->get('username'), $frm['oldpassword'])) { 51 51 $fv->addError('oldpassword', _("Your <strong>Old password</strong> failed authentication.")); 52 $app->logMsg(sprintf('Password change failed for %s, using (md5ed) password: %s', $auth->get Val('username'), md5($frm['oldpassword'])), LOG_NOTICE, __FILE__, __LINE__);52 $app->logMsg(sprintf('Password change failed for %s, using (md5ed) password: %s', $auth->get('username'), md5($frm['oldpassword'])), LOG_NOTICE, __FILE__, __LINE__); 53 53 } 54 54 55 55 if (!$fv->anyErrors()) { 56 56 $auth->setPassword(null, $frm['newpassword']); 57 $app->logMsg(sprintf('Password change successful for %s', $auth->get Val('username')), LOG_INFO, __FILE__, __LINE__);58 $app->raiseMsg(sprintf(_("Password change successful for %s"), $auth->get Val('username')), MSG_SUCCESS, __FILE__, __LINE__);57 $app->logMsg(sprintf('Password change successful for %s', $auth->get('username')), LOG_INFO, __FILE__, __LINE__); 58 $app->raiseMsg(sprintf(_("Password change successful for %s"), $auth->get('username')), MSG_SUCCESS, __FILE__, __LINE__); 59 59 $app->dieBoomerangURL('admin_password'); 60 60 }
Note: See TracChangeset
for help on using the changeset viewer.