Changeset 147 for trunk/services


Ignore:
Timestamp:
Jun 5, 2006 1:31:25 AM (18 years ago)
Author:
scdev
Message:

Q - Change Auth_SQL::getVal to Auth_SQL::get and Auth_SQL::setVal to Auth_SQL::set.

Location:
trunk/services
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/services/admins.php

    r143 r147  
    202202    }
    203203
    204     if (getFormData('user_type') == 'root' && 'root' != $auth->getVal('user_type')) {
     204    if (getFormData('user_type') == 'root' && 'root' != $auth->get('user_type')) {
    205205        $fv->addError('user_type', sprintf(_("You do not have clearance to create a user with root privileges."), null));
    206206    }
     
    343343    $qid = $db->query("SELECT COUNT(*) from admin_tbl");
    344344    list($num_admins) = mysql_fetch_row($qid);
    345     if ('root' == $user_type && 'root' != $auth->getVal('user_type')) {
     345    if ('root' == $user_type && 'root' != $auth->get('user_type')) {
    346346        // Only root users can delete root users!
    347347        $app->raiseMsg(_("You do not have clearance to delete a root administrator."), MSG_NOTICE, __FILE__, __LINE__);
     
    349349        // There must always be at least one admnistrator!
    350350        $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->getVal('user_id') == $id) {
     351    } else if ($auth->get('user_id') == $id) {
    352352        // Do not delete yourself!
    353353        $app->raiseMsg(_("You cannot delete yourself."), MSG_NOTICE, __FILE__, __LINE__);
     
    388388            '" . $db->escapeString($frm['email']) . "',
    389389            '" . $db->escapeString($frm['user_type']) . "',
    390             '" . $db->escapeString($auth->getVal('user_id')) . "',
     390            '" . $db->escapeString($auth->get('user_id')) . "',
    391391            NOW()
    392392        )
     
    435435            email = '" . $db->escapeString($frm['email']) . "',
    436436            user_type = '" . $db->escapeString($frm['user_type']) . "',
    437             modified_by_user_id = '" . $db->escapeString($auth->getVal('user_id')) . "',
     437            modified_by_user_id = '" . $db->escapeString($auth->get('user_id')) . "',
    438438            modified_datetime = NOW()
    439439        WHERE admin_id = '" . $db->escapeString($frm['admin_id']) . "'
  • trunk/services/login.php

    r136 r147  
    2121        $app->raiseMsg(_("You are now logged in."), MSG_SUCCESS, __FILE__, __LINE__);
    2222        $app->dieBoomerangURL('login');
    23         $app->logMsg(sprintf('%s %s successfully logged-in.', $auth->getVal('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__);
    2424    } else {
    2525        $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->getVal('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__);
    2727    }
    2828}
  • trunk/services/logout.php

    r137 r147  
    99    require_once 'codebase/lib/Lock.inc.php';
    1010    $lock =& Lock::getInstance($auth);
    11     $lock->removeAll($auth->getVal('user_id'));
     11    $lock->removeAll($auth->get('user_id'));
    1212}
    1313
  • trunk/services/password.php

    r143 r147  
    4848    }
    4949
    50     if (!$fv->anyErrors() && false === $auth->authenticate($auth->getVal('username'), $frm['oldpassword'])) {
     50    if (!$fv->anyErrors() && false === $auth->authenticate($auth->get('username'), $frm['oldpassword'])) {
    5151        $fv->addError('oldpassword', _("Your <strong>Old password</strong> failed authentication."));
    52         $app->logMsg(sprintf('Password change failed for %s, using (md5ed) password: %s', $auth->getVal('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__);
    5353    }
    5454
    5555    if (!$fv->anyErrors()) {
    5656        $auth->setPassword(null, $frm['newpassword']);
    57         $app->logMsg(sprintf('Password change successful for %s', $auth->getVal('username')), LOG_INFO, __FILE__, __LINE__);
    58         $app->raiseMsg(sprintf(_("Password change successful for %s"), $auth->getVal('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__);
    5959        $app->dieBoomerangURL('admin_password');
    6060    }
Note: See TracChangeset for help on using the changeset viewer.