Move isUserVerified to OC_Util

remotes/origin/stable5
Lukas Reschke 13 years ago
parent 77e18b01ba
commit f4142bd2a8
  1. 13
      lib/json.php
  2. 12
      lib/util.php
  3. 2
      settings/ajax/changepassword.php

@ -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;
}
}

Loading…
Cancel
Save