From 03d0311618267cf0b16445161c4d275749d64a5e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 7 Oct 2009 21:40:05 -0700 Subject: Implement a user::is_writable() API method and disable the user add, updates and display if the Identity driver does not support writes. This is set in the config.identity.php --- modules/gallery/libraries/Identity.php | 11 +++++++++++ modules/gallery/libraries/drivers/Identity.php | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'modules/gallery/libraries') diff --git a/modules/gallery/libraries/Identity.php b/modules/gallery/libraries/Identity.php index a24e6226..fec822db 100644 --- a/modules/gallery/libraries/Identity.php +++ b/modules/gallery/libraries/Identity.php @@ -92,6 +92,17 @@ class Identity_Core { } } + /** + * Determine if a feature is supported by the driver. + * + * @param string $feature the name of the feature to check + * @return boolean true if supported + */ + public function is_writable() { + return !empty($this->config["allow_updates"]); + } + + /** * Return the guest user. * diff --git a/modules/gallery/libraries/drivers/Identity.php b/modules/gallery/libraries/drivers/Identity.php index e67547be..a92958c7 100644 --- a/modules/gallery/libraries/drivers/Identity.php +++ b/modules/gallery/libraries/drivers/Identity.php @@ -176,7 +176,6 @@ abstract class User_Definition { case "hash": case "url": case "locale": - Kohana::log("error", "__set($column, $value)"); $this->user->$column = $value; break; default: -- cgit v1.2.3