Skip to content
Snippets Groups Projects
Commit 24acec25 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

check callback for string type before validating method, fixes #4442

Closes #4442

Merge request studip/studip!3249
parent 7e7df151
No related branches found
No related tags found
No related merge requests found
...@@ -467,7 +467,7 @@ class StudipAuthAbstract ...@@ -467,7 +467,7 @@ class StudipAuthAbstract
if ($user && is_array($this->user_data_mapping)) { if ($user && is_array($this->user_data_mapping)) {
foreach ($this->user_data_mapping as $key => $value) { foreach ($this->user_data_mapping as $key => $value) {
$callback = null; $callback = null;
if (method_exists($this, $value['callback'])) { if (is_string($value['callback']) && method_exists($this, $value['callback'])) {
$callback = [$this, $value['callback']]; $callback = [$this, $value['callback']];
} else if (is_callable($value['callback'])) { } else if (is_callable($value['callback'])) {
$callback = $value['callback']; $callback = $value['callback'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment