]> andersk Git - sql-web.git/blobdiff - lib/security.lib.php
login refreshes databases
[sql-web.git] / lib / security.lib.php
index d345e61bf3dbbf162b704a25bdcccfddf2bc38fc..0fc8a91365cbd4f7386fb3fa0516fba65a565922 100644 (file)
@@ -87,7 +87,7 @@ class User {
        private $dblist;
     function User($userId) {
                $this->userId = $userId;
-        $sql = sprintf("SELECT User.UserId, Username, Password, Name, Email, UL, bEnabled, nBytesSoft, nBytesHard, nBytes, nDatabases, nDatabasesHard, IF(nBytes>nBytesHard,1,0) AS bOverQuota
+        $sql = sprintf("SELECT User.UserId, Username, Name, Email, UL, bEnabled, nBytesSoft, nBytesHard, nBytes, nDatabases, nDatabasesHard, IF(nBytes>nBytesHard,1,0) AS bOverQuota
                         FROM User
                                                INNER JOIN UserQuota ON User.UserId = UserQuota.UserId
                                                INNER JOIN UserStat ON User.UserId = UserStat.UserId
@@ -96,13 +96,12 @@ class User {
         $r = fetchRows(DBSelect($sql),'UserId');
         $this->info = count($r)?array_shift($r):$r;
                $this->dblist = $this->getDBList();
-//             $this->pass = base64_decode($this->info['Password']);
     }
        function refresh() {
                unset($this->dblist);
                $this->User($this->userId);
                /*
-        $sql = sprintf("SELECT UserId, Username, Password, Name, Email, UL, bEnabled
+        $sql = sprintf("SELECT UserId, Username, Name, Email, UL, bEnabled
                         FROM User
                         WHERE UserId = '%s'",
                         mysql_escape_string($this->userId));
@@ -297,14 +296,16 @@ function redirectStart() {
        redirectFull(BASE_URL,null);
 }
 function redirectFull($target,$secure) {
-       redirect2((((isSSL()&&is_null($secure))||$secure==true)?'https://':'http://').$_SERVER['SERVER_NAME'].$target);
+       //redirect2((((isSSL()&&is_null($secure))||$secure==true)?'https://':'http://').$_SERVER['SERVER_NAME'].$target);
+       redirect2((((isSSL()&&is_null($secure))||$secure==true)?'https://scripts-cert.mit.edu':'http://scripts.mit.edu').$target);
 }
 function redirect2($target) {
        header('Location: '.$target);
        exit;
 }
 function flipSSL() {
-       return (isSSL()?'http://':'https://').$_SERVER['SERVER_NAME'].$_SERVER['REDIRECT_URL'];
+       //return (isSSL()?'http://':'https://').$_SERVER['SERVER_NAME'].$_SERVER['REDIRECT_URL'];
+       return (isSSL()?'http://scripts.mit.edu':'https://scripts-cert.mit.edu').$_SERVER['REDIRECT_URL'];
 }
 
 ## USER SCRIPTS
This page took 0.029547 seconds and 4 git commands to generate.