Commit ddb2505d authored by Piers Harding's avatar Piers Harding Committed by Robert Lyon
Browse files

Bug 1577258: Fixing more function signatures for PHP7



behatnotneeded

Change-Id: I38fbf34dae007b7a64e0753a69a8cebb7a3401bd
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 7378f7e0
...@@ -36,7 +36,7 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype { ...@@ -36,7 +36,7 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
return false; // true; // need to do more work on aretfact/artefact.php before this can be switched on. return false; // true; // need to do more work on aretfact/artefact.php before this can be switched on.
} }
public static function override_instance_title() { public static function override_instance_title(BlockInstance $instance) {
return get_string('Annotation', 'artefact.annotation'); return get_string('Annotation', 'artefact.annotation');
} }
......
...@@ -427,7 +427,7 @@ EOF; ...@@ -427,7 +427,7 @@ EOF;
EOF; EOF;
} }
public static function instance_config_validate($form, $values) { public static function instance_config_validate(Pieform $form, $values) {
if (empty($values['tagselect'])) { if (empty($values['tagselect'])) {
// We don't have a tagselect field due to no journal entries having a tag // We don't have a tagselect field due to no journal entries having a tag
......
...@@ -283,7 +283,7 @@ EOF; ...@@ -283,7 +283,7 @@ EOF;
} }
class BrowserIDUser extends LiveUser { class BrowserIDUser extends LiveUser {
public function login($email) { public function login($username, $password=null) {
// This will do one of 3 things // This will do one of 3 things
// 1 - If a user has an account, log them in // 1 - If a user has an account, log them in
// 2 - If a user doesn't have an account, and there is an auth method (which also has weautocreate), create acc and login // 2 - If a user doesn't have an account, and there is an auth method (which also has weautocreate), create acc and login
...@@ -309,7 +309,7 @@ class BrowserIDUser extends LiveUser { ...@@ -309,7 +309,7 @@ class BrowserIDUser extends LiveUser {
$institutionjoin = ''; $institutionjoin = '';
$institutionwhere = ''; $institutionwhere = '';
$sqlvalues = array($email); $sqlvalues = array($username);
if ($authinstance->institutionname != 'mahara') { if ($authinstance->institutionname != 'mahara') {
// Make sure that user is in the right institution // Make sure that user is in the right institution
$institutionjoin = 'JOIN {usr_institution} ui ON ui.usr = u.id'; $institutionjoin = 'JOIN {usr_institution} ui ON ui.usr = u.id';
...@@ -357,7 +357,7 @@ class BrowserIDUser extends LiveUser { ...@@ -357,7 +357,7 @@ class BrowserIDUser extends LiveUser {
} }
foreach ($autocreate as $auth) { foreach ($autocreate as $auth) {
if (!$user = $auth->create_new_user($email)) { if (!$user = $auth->create_new_user($username)) {
continue; continue;
} }
$this->authenticate($user, $auth->instanceid); $this->authenticate($user, $auth->instanceid);
...@@ -367,15 +367,15 @@ class BrowserIDUser extends LiveUser { ...@@ -367,15 +367,15 @@ class BrowserIDUser extends LiveUser {
// Autocreation failed; try registration. // Autocreation failed; try registration.
list($form, $registerconfirm) = auth_generate_registration_form('register', 'browserid', '/register.php'); list($form, $registerconfirm) = auth_generate_registration_form('register', 'browserid', '/register.php');
if (!$form) { if (!$form) {
throw new AuthUnknownUserException(get_string('emailnotfound', 'auth.browserid', $email)); throw new AuthUnknownUserException(get_string('emailnotfound', 'auth.browserid', $username));
} }
if (record_exists('usr', 'email', $email) if (record_exists('usr', 'email', $username)
|| record_exists('artefact_internal_profile_email', 'email', $email)) { || record_exists('artefact_internal_profile_email', 'email', $username)) {
throw new AuthUnknownUserException(get_string('emailalreadytaken', 'auth.internal', $email)); throw new AuthUnknownUserException(get_string('emailalreadytaken', 'auth.internal', $username));
} }
$form['elements']['email'] = array( $form['elements']['email'] = array(
'type' => 'hidden', 'type' => 'hidden',
'value' => $email 'value' => $username
); );
$form['elements']['authtype'] = array( $form['elements']['authtype'] = array(
'type' => 'hidden', 'type' => 'hidden',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment