diff options
author | M.Gergo | 2018-12-16 16:35:17 +0100 |
---|---|---|
committer | M.Gergo | 2018-12-16 16:35:17 +0100 |
commit | e6988247360fa98b85915a38803d018dd353df00 (patch) | |
tree | 24f42628f6cdaedacc06ce033378173a0e561be9 /mayor-orig/www/include/modules/session | |
parent | 2a219b9ea312fb88703a33ea2450e32af40be64a (diff) | |
download | mayor-e6988247360fa98b85915a38803d018dd353df00.tar.gz mayor-e6988247360fa98b85915a38803d018dd353df00.zip |
Rev: 4412
Diffstat (limited to 'mayor-orig/www/include/modules/session')
-rw-r--r-- | mayor-orig/www/include/modules/session/accountInfo.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mayor-orig/www/include/modules/session/accountInfo.php b/mayor-orig/www/include/modules/session/accountInfo.php index 4b1521d0..b670312f 100644 --- a/mayor-orig/www/include/modules/session/accountInfo.php +++ b/mayor-orig/www/include/modules/session/accountInfo.php @@ -45,4 +45,34 @@ } + function setEduroamRecord($ADAT) { + + // ALTER TABLE eduroam ADD UNIQUE INDEX (userAccount,policy); + // ALTER TABLE eduroam ADD UNIQUE INDEX (eduroamUID); + // https://wiki.niif.hu/index.php?title=Sulinet_felhaszn%C3%A1l%C3%B3k_t%C3%B6meges_felvitele + + $q = "UPDATE eduroam SET eduroamPASSWORD='%s', modositasDt = NOW() WHERE userAccount='%s' AND policy='%s'"; + $res = db_query($q, array('modul'=>'login','values'=>array($ADAT['eduroamPASSWORD'],$userAccount,$toPolicy))); + + } + + function getEduroamSettings($userAccount,$toPolicy,$ADAT) { + + $res = false; + if (_ACCESS_AS == _ADMIN_ACCESS) { + $userAccoungt = ($userAccount); + $toPolicy = ($toPolicy); + } else { + $userAccount = (_USERACCOUNT); + $toPolicy = (_POLICY); + } + + if ($toPolicy == 'private') { + $q = "SELECT * FROM eduroam WHERE userAccount='%s' AND policy='%s'"; + $res = db_query($q, array('modul'=>'login','values'=>array($userAccount,$toPolicy), 'result'=>'record')); + } + return $res; + + } + ?> |