from the source it seems that the setting

create_user_groups 

which has a default of 

"user_%(id)s"

can be used. in your case it seems that setting it to user_%(username)s 
should do the trick.

On Wednesday, May 4, 2016 at 8:48:49 PM UTC+2, Antonio Salazar wrote:
>
> I've disabled user group creation, but now I need user-specific 
> permissions, so I'm going to re-enable it and create the missing user 
> groups. I'd really like the groups to be user_[username] instead of 
> user_[user_id].
> Is there an upgrade-friendly way to base the group name on something other 
> than the user id?
>
> I know it's best practice to use the id because it's unique, but in my 
> case, the username is also unique and invariable. I'd bear the slight risk 
> of inconsistency in exchange for human-readable group names.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to