mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Coding standards
This commit is contained in:
@@ -907,6 +907,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
public static function get_usr_id_from_email($email)
|
||||
{
|
||||
if (is_null($email))
|
||||
|
||||
return false;
|
||||
|
||||
$conn = connection::getPDOConnection();
|
||||
@@ -1277,6 +1278,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
protected function load_preferences()
|
||||
{
|
||||
if ($this->_prefs)
|
||||
|
||||
return $this;
|
||||
|
||||
$registry = \registry::get_instance();
|
||||
@@ -1379,7 +1381,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -1485,6 +1487,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
{
|
||||
$this->load_preferences();
|
||||
if (isset($this->_prefs[$prop]) && $this->_prefs[$prop] === $value)
|
||||
|
||||
return $value;
|
||||
|
||||
$ok = true;
|
||||
@@ -1522,6 +1525,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
$appbox = appbox::get_instance();
|
||||
$session = $appbox->get_session();
|
||||
if (!$session->is_authenticated())
|
||||
|
||||
return;
|
||||
|
||||
$ses_id = $session->get_ses_id();
|
||||
@@ -1580,7 +1584,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1644,7 +1648,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1730,7 +1734,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $locale;
|
||||
@@ -1796,6 +1800,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
public function get_nonce()
|
||||
{
|
||||
if ($this->nonce)
|
||||
|
||||
return $this->nonce;
|
||||
$nonce = false;
|
||||
|
||||
|
@@ -542,6 +542,7 @@ class User_Query implements User_QueryInterface
|
||||
public function get_total()
|
||||
{
|
||||
if ($this->total)
|
||||
|
||||
return $this->total;
|
||||
|
||||
$conn = $this->appbox->get_connection();
|
||||
@@ -702,6 +703,7 @@ class User_Query implements User_QueryInterface
|
||||
public function on_base_ids(Array $base_ids = null)
|
||||
{
|
||||
if (!$base_ids)
|
||||
|
||||
return $this;
|
||||
|
||||
$this->bases_restrictions = true;
|
||||
@@ -726,6 +728,7 @@ class User_Query implements User_QueryInterface
|
||||
public function on_sbas_ids(Array $sbas_ids = null)
|
||||
{
|
||||
if (!$sbas_ids)
|
||||
|
||||
return $this;
|
||||
|
||||
$this->sbas_restrictions = true;
|
||||
|
Reference in New Issue
Block a user