Email Address as Username.

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
zimage
Posts: 2
Joined: Mon Mar 27, 2006 9:20 am
Location: Madison, WI, USA

Email Address as Username.

Post by zimage »

I have taken an old patch that allows cacti to use apache's mod_securid and I
tweaked it to work with mod_auth_kerb. One modification I had to make to the
cacti source that wasn't in the original patch was to allow '@' and '.'
characters in usernames. I'd like to request this as a feature. Could cacti
officially support email addresses as userids in cacti?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

If you are running 0.8.6h, alter the following line (158) in the user_admin.php file from:

Code: Select all

$save["username"] = form_input_validate($_POST["username"], "username", "^[A-Za-z0-9\._\-]+$", false, 3);
to

Code: Select all

$save["username"] = form_input_validate($_POST["username"], "username", "^[A-Za-z0-9\._\-\@]+$", false, 3);
and that will allow "@" in the usernames.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
zimage
Posts: 2
Joined: Mon Mar 27, 2006 9:20 am
Location: Madison, WI, USA

Post by zimage »

rony wrote:If you are running 0.8.6h, alter the following line (158) in the user_admin.php file from:

Code: Select all

$save["username"] = form_input_validate($_POST["username"], "username", "^[A-Za-z0-9\._\-]+$", false, 3);
to

Code: Select all

$save["username"] = form_input_validate($_POST["username"], "username", "^[A-Za-z0-9\._\-\@]+$", false, 3);
and that will allow "@" in the usernames.
Yup. I already made this change to my code as I stated above. What I was wondering is if this could officially be supported in future releases.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I don't see why not.. :)
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests