[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [ocs-webserver] /: login
From: Ronald von Schlegell <null () kde ! org>
Date: 2018-09-20 7:49:19
Message-ID: E1g2tiB-0001uL-Eq () code ! kde ! org
[Download RAW message or body]
Git commit 4c16a829a312529470dfb077f02fdecb49c05c41 by Ronald von Schlegell.
Committed on 20/09/2018 at 07:49.
Pushed by ronaldv into branch 'master'.
login
M +3 -1 application/modules/default/views/scripts/authorization/login.phtml
M +2 -1 application/modules/default/views/scripts/authorization/register.phtml
M +20 -3 library/Local/Auth/Adapter/Ocs.php
https://commits.kde.org/ocs-webserver/4c16a829a312529470dfb077f02fdecb49c05c41
diff --git a/application/modules/default/views/scripts/authorization/login.phtml \
b/application/modules/default/views/scripts/authorization/login.phtml index \
a9a78e29..71f3995c 100644
--- a/application/modules/default/views/scripts/authorization/login.phtml
+++ b/application/modules/default/views/scripts/authorization/login.phtml
@@ -47,6 +47,7 @@ $this->headMeta()->setName('robots', 'noindex, nofollow');
<h3></h3>
<div id="social-login-elements">
+ <?php /*
<div class="register-facebook">
<p class="small center light greylight">Login with</p>
<a href="/login/github/<?=$url_param_redirect?>" class="btn \
btn-block btn-social btn-github" rel="nofollow"> @@ -54,7 +55,8 @@ \
$this->headMeta()->setName('robots', 'noindex, nofollow'); <span \
class="small">Github</span> </a>
</div>
-
+ */ ?>
+
<div class="bottom margin-top-15">
<a href="/login/ocs/<?=$url_param_redirect?>" class="btn \
btn-block btn-social btn-github"> <span class="glyphicon glyphicon-log-in"></span>
diff --git a/application/modules/default/views/scripts/authorization/register.phtml \
b/application/modules/default/views/scripts/authorization/register.phtml index \
b6f31dd3..5e860f52 100644
--- a/application/modules/default/views/scripts/authorization/register.phtml
+++ b/application/modules/default/views/scripts/authorization/register.phtml
@@ -41,6 +41,7 @@ $this->headMeta()->setName('robots', 'noindex, nofollow');
<h3></h3>
<div id="social-login-elements">
+ <?php /*
<div class="register-facebook">
<p class="small center light greylight">Register \
with</p>
<a href="/login/github/" class="btn btn-block \
btn-social btn-github" rel="nofollow"> @@ -48,7 +49,7 @@ \
$this->headMeta()->setName('robots', 'noindex, nofollow'); <span \
class="small">Github</span> </a>
</div>
-
+ */ ?>
<div class="bottom margin-top-15">
<div id="show-login-description" class="small light \
lightgrey">Already have an account?</div> <div class="login2">
diff --git a/library/Local/Auth/Adapter/Ocs.php b/library/Local/Auth/Adapter/Ocs.php
index 98fd23f9..dd4e9a3f 100644
--- a/library/Local/Auth/Adapter/Ocs.php
+++ b/library/Local/Auth/Adapter/Ocs.php
@@ -125,7 +125,15 @@ class Local_Auth_Adapter_Ocs implements \
Local_Auth_Adapter_Interface 'mail' => $this->_identity,
'pwd' => $this->_credential
));
- Zend_Registry::get('logger')->debug(__METHOD__ . ' - sql take seconds: ' . \
$this->_db->getProfiler()->getLastQueryProfile() +
+ $sql = str_replace(':active', Default_Model_DbTable_Member::MEMBER_ACTIVE, \
$sql); + $sql = str_replace(':deleted', \
Default_Model_DbTable_Member::MEMBER_NOT_DELETED, $sql); + $sql = \
str_replace(':login',"'". Default_Model_DbTable_Member::MEMBER_LOGIN_LOCAL . "'", \
$sql); + $sql = str_replace(':mail', "'". $this->_identity . "'", $sql);
+ $sql = str_replace(':pwd', "'". $this->_credential . "'", $sql);
+
+
+ Zend_Registry::get('logger')->debug(__METHOD__ . ' - SQL: ' . $sql . ' - sql \
take seconds: ' . $this->_db->getProfiler()->getLastQueryProfile()
\
->getElapsedSecs()) ;
$this->_db->getProfiler()->setEnabled(false);
@@ -134,6 +142,8 @@ class Local_Auth_Adapter_Ocs implements \
Local_Auth_Adapter_Interface }
/**
+ * Fetches a user by username, username ist not case sensitve
+ *
* @return array
* @throws Zend_Exception
*/
@@ -147,7 +157,7 @@ class Local_Auth_Adapter_Ocs implements \
Local_Auth_Adapter_Interface m.`is_active` = :active AND
m.`is_deleted` = :deleted AND
m.`login_method` = :login AND
- m.`username` = :username AND
+ LOWER(m.`username`) = LOWER(:username) AND
m.`password` = :pwd";
$this->_db->getProfiler()->setEnabled(true);
@@ -158,7 +168,14 @@ class Local_Auth_Adapter_Ocs implements \
Local_Auth_Adapter_Interface 'username' => $this->_identity,
'pwd' => $this->_credential
));
- Zend_Registry::get('logger')->debug(__METHOD__ . ' - sql take seconds: ' . \
$this->_db->getProfiler()->getLastQueryProfile() +
+ $sql = str_replace(':active', Default_Model_DbTable_Member::MEMBER_ACTIVE, \
$sql); + $sql = str_replace(':deleted', \
Default_Model_DbTable_Member::MEMBER_NOT_DELETED, $sql); + $sql = \
str_replace(':login',"'". Default_Model_DbTable_Member::MEMBER_LOGIN_LOCAL . "'", \
$sql); + $sql = str_replace(':username', "'". $this->_identity . "'", $sql);
+ $sql = str_replace(':pwd', "'". $this->_credential . "'", $sql);
+
+ Zend_Registry::get('logger')->debug(__METHOD__. ' - SQL: ' . $sql . ' - sql \
take seconds: ' . $this->_db->getProfiler()->getLastQueryProfile()
\
->getElapsedSecs()) ;
$this->_db->getProfiler()->setEnabled(false);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic