Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
realname
Commits
4d840495
Commit
4d840495
authored
Dec 09, 2010
by
Dave Reid
Browse files
by Dave Reid: Strip HTML tags and truncate to 255 characters prior to saving into the database.
parent
87af8ad9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
realname.module
realname.module
+4
-1
No files found.
realname.module
View file @
4d840495
...
...
@@ -188,7 +188,10 @@ function realname_update($account) {
// Perform token replacement on the real name pattern.
$realname
=
token_replace
(
$pattern
,
array
(
'user'
=>
$account
),
array
(
'clear'
=>
TRUE
,
'sanitize'
=>
FALSE
));
$realname
=
trim
(
$realname
);
$realname
=
trim
(
strip_tags
(
$realname
));
// The name must be trimmed to 255 characters before inserting into the database.
$realname
=
truncate_utf8
(
$realname
,
255
);
// Allow other modules to alter the generated realname.
drupal_alter
(
'realname'
,
$realname
,
$account
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment