mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix 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();
|
||||
@@ -1255,7 +1256,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
|
||||
public function get_applied_template()
|
||||
{
|
||||
|
||||
|
||||
return $this->applied_template;
|
||||
}
|
||||
|
||||
@@ -1277,6 +1278,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
protected function load_preferences()
|
||||
{
|
||||
if ($this->_prefs)
|
||||
|
||||
return $this;
|
||||
$sql = 'SELECT prop, value FROM usr_settings WHERE usr_id= :id';
|
||||
$stmt = $this->appbox->get_connection()->prepare($sql);
|
||||
@@ -1371,7 +1373,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -1477,6 +1479,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;
|
||||
@@ -1514,6 +1517,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();
|
||||
@@ -1572,7 +1576,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1636,7 +1640,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1722,7 +1726,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $locale;
|
||||
@@ -1788,6 +1792,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
||||
public function get_nonce()
|
||||
{
|
||||
if ($this->nonce)
|
||||
|
||||
return $this->nonce;
|
||||
$nonce = false;
|
||||
|
||||
|
@@ -269,7 +269,7 @@ class User_Query implements User_QueryInterface
|
||||
$extra = $this->include_phantoms ? ' OR sbas_id IS NULL ' : '';
|
||||
|
||||
$not_sbas_id = array_diff($this->active_sbas, $this->sbas_ids);
|
||||
|
||||
|
||||
if (count($not_sbas_id) > 0 && count($not_sbas_id) < count($this->sbas_ids))
|
||||
{
|
||||
$sql .= sprintf(' AND ((sbas_id != %s ) ' . $extra . ')'
|
||||
@@ -489,6 +489,7 @@ class User_Query implements User_QueryInterface
|
||||
public function get_total()
|
||||
{
|
||||
if ($this->total)
|
||||
|
||||
return $this->total;
|
||||
|
||||
$conn = $this->appbox->get_connection();
|
||||
@@ -637,6 +638,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;
|
||||
@@ -661,6 +663,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