Move isUserVerified to OC_Util

This commit is contained in:
Lukas Reschke 2012-10-16 00:47:22 +02:00
Родитель 77e18b01ba
Коммит f4142bd2a8
3 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

@ -90,18 +90,7 @@ class OC_JSON{
exit();
}
}
/**
* Check if the user verified the login with his password in the last 15 minutes
* @return bool
*/
public static function isUserVerified() {
// Check if the user verified his password in the last 15 minutes
if(!isset($_SESSION['verifiedLogin']) OR $_SESSION['verifiedLogin'] < time()) {
return false;
}
return true;
}
/**
* Send json error msg
*/

Просмотреть файл

@ -405,6 +405,18 @@ class OC_Util {
}
}
/**
* Check if the user verified the login with his password in the last 15 minutes
* @return bool
*/
public static function isUserVerified() {
// Check if the user verified his password in the last 15 minutes
if(!isset($_SESSION['verifiedLogin']) OR $_SESSION['verifiedLogin'] < time()) {
return false;
}
return true;
}
/**
* Redirect to the user default page
*/

Просмотреть файл

@ -23,7 +23,7 @@ if(OC_User::getUser() === $username) {
{
$userstatus = 'user';
} else {
if (!OC_JSON::isUserVerified()) {
if (!OC_Util::isUserVerified()) {
$userstatus = null;
}
}