diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-02-11 17:44:02 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-02-14 08:38:37 +0100 |
commit | ffae6f4b847e96d691053300c355ab81edc6c1c8 (patch) | |
tree | 928a210abf40ab333c0a08fb469be87c71147b24 /lib/user.php | |
parent | 2d6d0a4ad438590504c13f04a6b2916a59a99c30 (diff) | |
download | nextcloud-server-ffae6f4b847e96d691053300c355ab81edc6c1c8.tar.gz nextcloud-server-ffae6f4b847e96d691053300c355ab81edc6c1c8.zip |
Style-fix: Breakup long lines
Diffstat (limited to 'lib/user.php')
-rw-r--r-- | lib/user.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/user.php b/lib/user.php index 6c74bb73c8c..35b259550f8 100644 --- a/lib/user.php +++ b/lib/user.php @@ -160,7 +160,8 @@ class OC_User { // Check the name for bad characters // Allowed are: "a-z", "A-Z", "0-9" and "_.@-" if( preg_match( '/[^a-zA-Z0-9 _\.@\-]/', $uid )) { - throw new Exception('Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "_.@-"'); + throw new Exception('Only the following characters are allowed in a username:' + .' "a-z", "A-Z", "0-9", and "_.@-"'); } // No empty username if(trim($uid) == '') { @@ -588,7 +589,8 @@ class OC_User { * @param string $userid */ public static function enableUser($userid) { - $sql = "DELETE FROM `*PREFIX*preferences` WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND `configvalue` = ?"; + $sql = "DELETE FROM `*PREFIX*preferences`' + .' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND `configvalue` = ?"; $stmt = OC_DB::prepare($sql); if ( ! OC_DB::isError($stmt) ) { $result = $stmt->execute(array($userid, 'core', 'enabled', 'false')); @@ -606,14 +608,17 @@ class OC_User { * @return bool */ public static function isEnabled($userid) { - $sql = "SELECT `userid` FROM `*PREFIX*preferences` WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND `configvalue` = ?"; + $sql = "SELECT `userid` FROM `*PREFIX*preferences`' + .' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND `configvalue` = ?"; $stmt = OC_DB::prepare($sql); if ( ! OC_DB::isError($stmt) ) { $result = $stmt->execute(array($userid, 'core', 'enabled', 'false')); if ( ! OC_DB::isError($result) ) { return $result->numRows() ? false : true; } else { - OC_Log::write('OC_User', 'could not check if enabled: '. OC_DB::getErrorMessage($result), OC_Log::ERROR); + OC_Log::write('OC_User', + 'could not check if enabled: '. OC_DB::getErrorMessage($result), + OC_Log::ERROR); } } else { OC_Log::write('OC_User', 'could not check if enabled: '. OC_DB::getErrorMessage($stmt), OC_Log::ERROR); |