mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 10:22:18 +00:00
Merged master into branch
Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -220,7 +220,7 @@ class Pruefungsprotokoll extends Auth_Controller
|
||||
$nullfields = array('uhrzeit', 'endezeit', 'abschlussbeurteilung_kurzbz', 'protokoll');
|
||||
foreach ($data as $idx => $item)
|
||||
{
|
||||
if (in_array($idx, $nullfields) & $item === '')
|
||||
if (in_array($idx, $nullfields) && $item === '')
|
||||
$data[$idx] = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ class LDAPLib
|
||||
}
|
||||
|
||||
// LDAP connection
|
||||
$ldapConnection = @ldap_connect($ldapConfigs[self::SERVER], $ldapConfigs[self::PORT]);
|
||||
$ldapConnection = @ldap_connect($ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT]);
|
||||
if ($ldapConnection) // if success
|
||||
{
|
||||
// Sets the LDAP protocol version
|
||||
|
||||
@@ -41,4 +41,23 @@ class Projektbetreuer_model extends DB_Model
|
||||
return error ('Incorrect parameter type');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Projektbetreuer data by authentification token
|
||||
* @param $zugangstoken
|
||||
* @return object
|
||||
*/
|
||||
public function getBetreuerByToken($zugangstoken)
|
||||
{
|
||||
$qry = '
|
||||
SELECT tbl_projektbetreuer.person_id, tbl_projektbetreuer.projektarbeit_id, student_uid
|
||||
FROM lehre.tbl_projektbetreuer
|
||||
JOIN lehre.tbl_projektarbeit USING (projektarbeit_id)
|
||||
WHERE zugangstoken = ? AND zugangstoken_gueltigbis >= NOW()
|
||||
ORDER BY tbl_projektbetreuer.insertamum DESC, projektarbeit_id DESC
|
||||
LIMIT 1
|
||||
';
|
||||
|
||||
return $this->execQuery($qry, array($zugangstoken));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,11 @@ class Benutzer_model extends DB_Model
|
||||
$this->hasSequence = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets active Benutzer from person_id
|
||||
* @param $person_id
|
||||
* @return object
|
||||
*/
|
||||
public function getFromPersonId($person_id)
|
||||
{
|
||||
return $this->loadWhere(array('person_id' => $person_id, 'aktiv' => true));
|
||||
|
||||
Reference in New Issue
Block a user