summaryrefslogtreecommitdiffstats
path: root/lib/util.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-10-16 00:47:22 +0200
committerLukas Reschke <lukas@statuscode.ch>2012-10-16 00:47:38 +0200
commitf4142bd2a8508577ca0abc1f6d84b59dc6de26e5 (patch)
tree8b57b7a31fed19b933d3184ea357b4fed8273855 /lib/util.php
parent77e18b01ba19d8573b3d5360d492e2f0b5d1d391 (diff)
downloadnextcloud-server-f4142bd2a8508577ca0abc1f6d84b59dc6de26e5.tar.gz
nextcloud-server-f4142bd2a8508577ca0abc1f6d84b59dc6de26e5.zip
Move isUserVerified to OC_Util
Diffstat (limited to 'lib/util.php')
-rwxr-xr-xlib/util.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index db712627581..ba2a02922a5 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -406,6 +406,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
*/
public static function redirectToDefaultPage() {