Skip to content
Snippets Groups Projects
Commit 097f4298 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Add isUserVerified()

parent c83a2a55
No related branches found
No related tags found
No related merge requests found
......@@ -81,15 +81,26 @@ class OC_JSON{
/**
* Check if the user verified the login with his password in the last 15 minutes
* @return bool
*/
public static function verifyUser() {
// Check if the user verified his password in the last 15 minutes
if($_SESSION['verifiedLogin'] < time() OR !isset($_SESSION['verifiedLogin'])) {
$l = OC_L10N::get('lib');
self::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
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($_SESSION['verifiedLogin'] < time() OR !isset($_SESSION['verifiedLogin'])) {
return false;
}
return true;
}
/**
* Send json error msg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment