@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Shibboleth; |
4 | 4 | |
5 | -require_once dirname(__FILE__) . '/scaffold/user.class.php'; |
|
5 | +require_once dirname(__FILE__).'/scaffold/user.class.php'; |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * A Chamilo user. Model for the User table. |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Shibboleth; |
4 | 4 | |
5 | -require_once dirname(__FILE__) . '/scaffold/admin.class.php'; |
|
5 | +require_once dirname(__FILE__).'/scaffold/admin.class.php'; |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * A Chamilo admin. Model for the Admin table. |
@@ -17,10 +17,10 @@ |
||
17 | 17 | { |
18 | 18 | |
19 | 19 | /** |
20 | - * Store for User objects. Interact with the database. |
|
21 | - * |
|
22 | - * @return UserStore |
|
23 | - */ |
|
20 | + * Store for User objects. Interact with the database. |
|
21 | + * |
|
22 | + * @return UserStore |
|
23 | + */ |
|
24 | 24 | public static function store() |
25 | 25 | { |
26 | 26 | static $result = false; |
@@ -33,6 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | /** |
35 | 35 | * |
36 | + * @param ShibbolethUser $data |
|
36 | 37 | * @return User |
37 | 38 | */ |
38 | 39 | public static function create($data = null) |
@@ -133,6 +134,7 @@ discard block |
||
133 | 134 | |
134 | 135 | /** |
135 | 136 | * |
137 | + * @param string $value |
|
136 | 138 | * @return User |
137 | 139 | */ |
138 | 140 | public function get_by_user_id($value) |
@@ -169,6 +171,7 @@ discard block |
||
169 | 171 | |
170 | 172 | /** |
171 | 173 | * |
174 | + * @param string $value |
|
172 | 175 | * @return bool |
173 | 176 | */ |
174 | 177 | public function username_exists($value) |
@@ -17,10 +17,10 @@ |
||
17 | 17 | { |
18 | 18 | |
19 | 19 | /** |
20 | - * Store for Admin objects. Interact with the database. |
|
21 | - * |
|
22 | - * @return AdminStore |
|
23 | - */ |
|
20 | + * Store for Admin objects. Interact with the database. |
|
21 | + * |
|
22 | + * @return AdminStore |
|
23 | + */ |
|
24 | 24 | public static function store() |
25 | 25 | { |
26 | 26 | static $result = false; |
@@ -168,12 +168,10 @@ |
||
168 | 168 | if (empty($result)) |
169 | 169 | { |
170 | 170 | $result = $default; |
171 | - } |
|
172 | - else if (count($result) == 1) |
|
171 | + } else if (count($result) == 1) |
|
173 | 172 | { |
174 | 173 | $result = reset($result); |
175 | - } |
|
176 | - else |
|
174 | + } else |
|
177 | 175 | { |
178 | 176 | $result = $result; |
179 | 177 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | $status_options = ''; |
53 | 53 | foreach ($items as $key => $value) |
54 | 54 | { |
55 | - $status_options.= "<option value=\"$key\">$value</option>"; |
|
55 | + $status_options .= "<option value=\"$key\">$value</option>"; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | return <<<EOT |
@@ -56,8 +56,7 @@ discard block |
||
56 | 56 | if ($email = $form->get_email()) |
57 | 57 | { |
58 | 58 | $user->email = $email; |
59 | - } |
|
60 | - else |
|
59 | + } else |
|
61 | 60 | { |
62 | 61 | $content = $form->display(); |
63 | 62 | Shibboleth::display()->page($content); |
@@ -71,8 +70,7 @@ discard block |
||
71 | 70 | if ($is_new_user && $user->status_request) |
72 | 71 | { |
73 | 72 | Shibboleth::redirect('/main/auth/shibboleth/app/view/request.php'); |
74 | - } |
|
75 | - else |
|
73 | + } else |
|
76 | 74 | { |
77 | 75 | Shibboleth::redirect(); |
78 | 76 | } |
@@ -141,8 +139,7 @@ discard block |
||
141 | 139 | { |
142 | 140 | $request_submitted = get_lang('RequestSubmitted'); |
143 | 141 | Shibboleth::display()->message_page($request_submitted); |
144 | - } |
|
145 | - else |
|
142 | + } else |
|
146 | 143 | { |
147 | 144 | $request_failed = get_lang('RequestFailed'); |
148 | 145 | Shibboleth::display()->error_page($request_failed); |
@@ -11,6 +11,6 @@ |
||
11 | 11 | * @license see /license.txt |
12 | 12 | * @author Laurent Opprecht <[email protected]>, Nicolas Rod for the University of Geneva |
13 | 13 | */ |
14 | -require_once dirname(__FILE__) . '/config/aai.class.php'; |
|
14 | +require_once dirname(__FILE__).'/config/aai.class.php'; |
|
15 | 15 | |
16 | 16 | Shibboleth::set_config(aai::config()); |
17 | 17 | \ No newline at end of file |
@@ -10,14 +10,14 @@ |
||
10 | 10 | * @author Laurent Opprecht <[email protected]>, Nicolas Rod for the University of Geneva |
11 | 11 | */ |
12 | 12 | |
13 | -$__dir = dirname(__FILE__) . '/'; |
|
14 | -$no_redirection = true; //no redirection in global. |
|
15 | -include_once($__dir . '/../../inc/global.inc.php'); |
|
13 | +$__dir = dirname(__FILE__).'/'; |
|
14 | +$no_redirection = true; //no redirection in global. |
|
15 | +include_once($__dir.'/../../inc/global.inc.php'); |
|
16 | 16 | |
17 | -require_once $__dir . 'config.php'; |
|
17 | +require_once $__dir.'config.php'; |
|
18 | 18 | |
19 | 19 | if (api_get_setting('server_type') == 'test') |
20 | 20 | { |
21 | - include_once $__dir . '/test/shibboleth_test_helper.class.php'; |
|
22 | - include_once $__dir . '/test/shibboleth_test.class.php'; |
|
21 | + include_once $__dir.'/test/shibboleth_test_helper.class.php'; |
|
22 | + include_once $__dir.'/test/shibboleth_test.class.php'; |
|
23 | 23 | } |